- render-clip-rect rendererprocedure
- set! (render-clip-rect renderer) rectsetter
- render-clip-rect-set! renderer rectsetter
Get or set the sdl2:renderer's clip rect. See SDL_RenderGetClipRect and SDL_RenderSetClipRect.
render-clip-rect returns a new managed sdl2:rect describing the renderer's clip rect. If clipping is disabled, it returns #<sdl2:rect (0 0 0 0)>.
But, be advised that it also returns #<sdl2:rect (0 0 0 0)> if that is the current clip rect. So, the meaning of #<sdl2:rect (0 0 0 0)> is ambiguous. Use render-clip-enabled? (in SDL 2.0.4 or higher) to unambiguously check whether clipping is enabled or disabled.
The setters accept either an sdl2:rect to enable clipping and set the clip rect, or #f to disable clipping. Setting to #<sdl2:rect (0 0 0 0)> does not disable clipping.
Requires sdl2 egg 0.2.0 or higher.