Wiki Page Content

Differences between revisions 9 and 10
Revision 9 as of 2010-09-03 00:29:20
Size: 1602
Editor: SheenaSmith
Comment: update formatting - categories
Revision 10 as of 2010-09-26 17:41:54
Size: 1116
Editor: SheenaSmith
Comment: update content (w/ Sam); remove 'draft' note
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablewidth="100%"style="color: rgb(255, 0, 0); text-align: center;">DRAFT||
Line 11: Line 10:
||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||
||int||'''x'''||the x location of the rectangle's upper left corner||
||int||'''y'''||the y location of the rectangle's upper left corner||
||int||'''w'''||the height of the rectangle||
||int||'''h'''||the width of the rectangle||
Line 20: Line 21:
''You can add useful comments here''

<<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>>*
An [[SDL_Rect]] defines a rectangular area of the screen. It is used by [[SDL_BlitSurface]]() to define blitting regions and by several other video functions.
Line 40: Line 24:
 .[[SDL_BlitSurface]] *
 .[[SDL_DirtyTexture]]?
 .[[SDL_BlitSurface]]
 .[[SDL_DirtyTexture]]
Line 43: Line 27:
 .[[SDL_GetDisplayBounds]]?  .[[SDL_GetDisplayBounds]]
Line 46: Line 30:
 .[[SDL_LockTexture]]?
 .[[SDL_RenderCopy]]?
 .[[SDL_RenderReadPixels]]?
 .[[SDL_RenderDrawRect]]?
 .[[SDL_RenderDrawRects]]?
 .[[SDL_RenderWritePixels]]?
 .[[SDL_LockTexture]]
 .[[SDL_RenderCopy]]
 .[[SDL_RenderReadPixels]]
 .[[SDL_RenderDrawRect]]
 .[[SDL_RenderDrawRects]]
 .[[SDL_RenderWritePixels]]
Line 53: Line 37:
 .[[SDL_UpdateTexture]]?  .[[SDL_UpdateTexture]]

SDL_Rect

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

Data Fields

int

x

the x location of the rectangle's upper left corner

int

y

the y location of the rectangle's upper left corner

int

w

the height of the rectangle

int

h

the width of the rectangle

Code Examples

You can add your code example here

Remarks

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


CategoryStruct, CategoryRect

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