summaryrefslogtreecommitdiff
path: root/doc/api.texi
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@vistahigherlearning.com>2019-01-08 10:29:31 -0500
committerDavid Thompson <dthompson@vistahigherlearning.com>2019-01-08 10:29:41 -0500
commitbec0030a6097f7ce4e6c2bd8d6100777c9798568 (patch)
treeb93e350599a311a1eb52341e0b457b1617bf6e12 /doc/api.texi
parentf1661d0c73acac78ba94820bcfa717a959387c03 (diff)
doc: Document (sdl2 rect) module.
* doc/api.texi (Rects): New section.
Diffstat (limited to 'doc/api.texi')
-rw-r--r--doc/api.texi29
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/api.texi b/doc/api.texi
index 84c2600..4c6969d 100644
--- a/doc/api.texi
+++ b/doc/api.texi
@@ -3,6 +3,7 @@
* Window Management:: Working with the window system.
* Input:: Keyboard, mouse, joystick input.
* Events:: Asynchronous event handling.
+* Rects:: 2D rectangles.
* Surfaces:: Software rendering.
* Rendering:: Hardware accelerated rendering.
* Images:: Loading and saving images.
@@ -796,6 +797,34 @@ Return @code{#t} if @var{event} is a game controller device event with the
@deffn {Scheme Procedure} poll-event
@end deffn
+@node Rects
+@section Rects
+
+@example
+(use-modules (sdl2 rect))
+@end example
+
+@deffn {Procedure} make-rect @var{x} @var{y} @var{width} @var{height}
+Return a new rectangle whose upper-left corner is at (@var{x},
+@var{y}) and is @var{width} pixels wide and @var{height} pixels high.
+@end deffn
+
+@deffn {Procedure} rect-x @var{rect}
+Return the X coordinate of @var{rect}.
+@end deffn
+
+@deffn {Procedure} rect-y @var{rect}
+Return the Y coordinate of @var{rect}.
+@end deffn
+
+@deffn {Procedure} rect-width @var{rect}
+Return the width of @var{rect}.
+@end deffn
+
+@deffn {Procedure} rect-height @var{rect}
+Return the height of @var{rect}.
+@end deffn
+
@node Surfaces
@section Surfaces