Function sdl2_sys::SDL_SetClipRect
source ยท pub unsafe extern "C" fn SDL_SetClipRect(
surface: *mut SDL_Surface,
rect: *const SDL_Rect,
) -> SDL_bool
Expand description
Set the clipping rectangle for a surface.
When surface
is the destination of a blit, only the area within the clip
rectangle is drawn into.
Note that blits are automatically clipped to the edges of the source and destination surfaces.
\param surface the SDL_Surface structure to be clipped \param rect the SDL_Rect structure representing the clipping rectangle, or NULL to disable clipping \returns SDL_TRUE if the rectangle intersects the surface, otherwise SDL_FALSE and blits will be completely clipped.
\since This function is available since SDL 2.0.0.
\sa SDL_BlitSurface \sa SDL_GetClipRect