AG_Rect
AG_RECT
(int
x, int y,
int w,
int h);
AG_Rect2
AG_RECT2
(int
x, int y,
int w,
int h);
AG_Rect
AG_ReadRect
(AG_DataSource
*ds);
AG_Rect2
AG_ReadRect2
(AG_DataSource
*ds);
void
AG_WriteRect
(AG_DataSource
*ds, AG_Rect
r);
void
AG_WriteRect2
(AG_DataSource
*ds, AG_Rect2
r);
AG_Rect
AG_Rect2ToRect
(AG_Rect2
r);
AG_Rect2
AG_RectToRect2
(AG_Rect
r);
AG_Rect
AG_RectIntersect
(const
AG_Rect *a, const AG_Rect
*b);
AG_Rect2
AG_RectIntersect2
(const
AG_Rect2 *a, const
AG_Rect2 *b);
int
AG_RectInside
(const
AG_Rect *r, int x,
int y);
int
AG_RectInside2
(const
AG_Rect2 *r, int x,
int y);
int
AG_RectCompare
(const
AG_Rect *a, const AG_Rect
*b);
int
AG_RectCompare2
(const
AG_Rect2 *a, const
AG_Rect2 *b);
void
AG_RectSize
(AG_Rect
*r, int w,
int h);
void
AG_RectSize2
(AG_Rect2
*r, int w,
int h);
void
AG_RectTranslate
(AG_Rect
*r, int x,
int y);
void
AG_RectTranslate2
(AG_Rect2
*r, int x,
int y);
The AG_RECT
() routine returns an
AG_Rect structure initialized to the given coordinates
x, y and dimensions
w, h. The
AG_RECT2
() variant returns an
AG_Rect2.
The AG_ReadRect
() function loads a
rectangle from the given
AG_DataSource(3).
AG_WriteRect
() writes a rectangle to a data
source.
The AG_RectToRect2
() and
AG_Rect2ToRect
() routines convert between the
AG_Rect and AG_Rect2
formats.
AG_RectIntersect
() and
AG_RectIntersect2
() return intersection of
rectangles a and b.
AG_RectInside
() and
AG_RectInside
() return 1 if the point
x, y lies inside of rectangle
r.
The AG_RectCompare
() and
AG_RectCompare2
() routines return 0 if both
rectangles possess the same coordinates and dimensions.
The AG_RectSize
() and
AG_RectSize2
() routines resize a rectangle to the
specified dimensions.
AG_RectTranslate
() and
AG_RectTranslate2
() translate a rectangle by the
specified amount.