From bec0030a6097f7ce4e6c2bd8d6100777c9798568 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 8 Jan 2019 10:29:31 -0500 Subject: doc: Document (sdl2 rect) module. * doc/api.texi (Rects): New section. --- doc/api.texi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) 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 -- cgit v1.2.3