Wiki Page Content

Differences between revisions 5 and 6
Revision 5 as of 2010-01-22 07:04:49
Size: 1090
Editor: SheenaSmith
Comment: testing Color2
Revision 6 as of 2010-08-08 05:55:51
Size: 1582
Editor: SheenaSmith
Comment: update content (old wiki)
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
<<Color2(red,DRAFT)>>
Line 23: Line 22:
SDL_Rect``Empty (=define), SDL_Rect``Equals (=define) (\sa in header; should these be in Remarks?) <<Color2(green,Below are listed as \sa in header. Should these be in Remarks?)>>
SDL_Rect``Empty
 Returns true if the rectangle has no area.
 {{{
#define SDL_RectEmpty(X) (((X)->w <= 0) || ((X)->h <= 0))
}}}

SDL_Rect``Equals
 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))
}}}

*<<BR>>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.<<BR>>*
Line 26: Line 39:
 .[[SDL_BlitSurface]] *

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