|
Size: 1090
Comment: testing Color2
|
Size: 1582
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.
*
