Wiki Page Content

Differences between revisions 2 and 3
Revision 2 as of 2010-03-02 20:15:55
Size: 1196
Editor: SheenaSmith
Comment: minor change
Revision 3 as of 2010-08-09 17:57:33
Size: 1221
Editor: SheenaSmith
Comment: update content (old wiki)
Deletions are marked like this. Additions are marked like this.
Line 34: Line 34:
 .[[SDL_BlitSurface]] *

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 surface / SDL_Surface to be updated

rect

a pointer to the SDL_Rect to be applied

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.

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