|
Size: 1196
Comment: minor change
|
Size: 1280
Comment: update content - rectangle
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 17: | Line 17: |
| ||'''surface'''||the surface / [[SDL_Surface]] to be updated|| ||'''rect'''||a pointer to the [[SDL_Rect]] to be applied|| |
||'''surface'''||a pointer to the surface of type [[SDL_Surface]] to be updated|| ||'''rect'''||a pointer to a rectangle of type [[SDL_Rect]], or NULL for the entire render target|| |
| Line 34: | Line 34: |
| .[[SDL_BlitSurface]] * |
DRAFT |
SDL_SetClipRect
Use this function to set the clipping rectangle for the destination surface in a blit.
Contents
Syntax
SDL_bool SDL_SetClipRect(SDL_Surface* surface,
const SDL_Rect* rect)
Function Parameters
surface |
a pointer to the surface of type SDL_Surface to be updated |
rect |
a pointer to a rectangle of type SDL_Rect, or NULL for the entire render target |
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.
