Wiki Page Content

Differences between revisions 6 and 7
Revision 6 as of 2010-08-08 05:55:51
Size: 1582
Editor: SheenaSmith
Comment: update content (old wiki)
Revision 7 as of 2010-08-08 05:58:07
Size: 1584
Editor: SheenaSmith
Comment: minor change
Deletions are marked like this. Additions are marked like this.
Line 23: Line 23:

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

None: SDL_Rect (last edited 2015-11-18 21:12:51 by PhilippWiesemann)

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