Wiki Page Content

Revision 9 as of 2010-09-03 00:29:20

Clear message

DRAFT

SDL_Rect

A structure that defines a rectangle, with the origin at the upper left.

Data Fields

int

x, y

the x and y location of the rectangle's upper left corner

int

w, h

the width (w) and height (h) of the rectangle

Code Examples

You can add your code example here

Remarks

You can add useful comments here

green

SDL_RectEmpty

  • Returns true if the rectangle has no area.
    #define SDL_RectEmpty(X)    (((X)->w <= 0) || ((X)->h <= 0))

SDL_RectEquals

  • Returns true if the two rectangles are equal.
    #define SDL_RectEquals(A, B)   (((A)->x == (B)->x) && ((A)->y == (B)->y) && \
    ((A)->w == (B)->w) && ((A)->h == (B)->h))

*
An SDL_Rect defines a rectangular area of pixels. It is used by SDL_BlitSurface() to define blitting regions and by several other video functions.
*


CategoryStruct, CategoryRect

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit