Wiki Page Content

Differences between revisions 7 and 8
Revision 7 as of 2010-10-11 04:29:57
Size: 1233
Editor: SheenaSmith
Comment: update content - pointers, structs
Revision 8 as of 2010-12-22 04:39:32
Size: 1345
Editor: SheenaSmith
Comment: update formatting - enums, structs, the/an
Deletions are marked like this. Additions are marked like this.
Line 17: Line 17:
||'''surface'''||the [[SDL_Surface]] to be clipped||
||'''rect'''||the clipping [[SDL_Rect]]^, or NULL for the entire render target^||
||'''surface'''||the [[SDL_Surface]] structure to be clipped||
||'''rect'''||the [[SDL_Rect]] structure defining the clipping rectangle^, or NULL for the entire render target/to disable clipping???^||
Line 29: Line 29:
If the clip rectangle is NULL, clipping will be disabled. If the clip rectangle is NULL, clipping will be disabled. <<Color2(green,Can this be moved to params?)>>

DRAFT

SDL_SetClipRect

Use this function to set the clipping rectangle for the destination surface in a blit.

Syntax

SDL_bool SDL_SetClipRect(SDL_Surface*    surface,
                         const SDL_Rect* rect)

Function Parameters

surface

the SDL_Surface structure to be clipped

rect

the SDL_Rect structure defining the clipping rectangle, or NULL for the entire render target/to disable clipping???

Return Value

If the clip rectangle doesn't intersect the surface, the function will return SDL_FALSE and blits will be completely clipped. Otherwise the function returns SDL_TRUE and blits to the surface will be clipped to the intersection of the surface area and the clipping rectangle.

Code Examples

You can add your code example here

Remarks

If the clip rectangle is NULL, clipping will be disabled. green

Note that blits are automatically clipped to the edges of the source and destination surfaces.


CategoryAPI, CategorySurface

None: SDL_SetClipRect (last edited 2011-04-05 20:54:56 by SheenaSmith)

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