Skip to content

cf_apply_scissor

Category: graphics
GitHub: cute_graphics.h


Sets up a scissor box to clip rendering within.

void cf_apply_scissor(int x, int y, int w, int h);
Parameters Description
x Center of the scissor box on the x-axis.
y Center of the scissor box on the y-axis.
w Width of the scissor box in pixels.
h Height of the scissor box in pixels.

Remarks

The scissor box is a window on the screen that rendering will be clipped within. Any rendering that occurs outside the scissor box will simply be ignored, rendering nothing and leaving the previous pixel contents untouched. You must only call this after calling cf_apply_shader.

cf_apply_canvas
cf_apply_viewport