natiny_render_scissor_begin
void natiny_render_scissor_begin(int x, int y, int width, int height);
Starts a scissor clip rectangle for subsequent draw calls on the currently bound render target.
Parameters
| Name | Type | Description |
|---|---|---|
x |
int |
Left edge of the clip rectangle |
y |
int |
Top edge of the clip rectangle |
width |
int |
Clip rectangle width |
height |
int |
Clip rectangle height |
Example
natiny_render_scissor_begin(40, 40, 220, 120);
draw_content();
natiny_render_scissor_end();
Notes
- Scissors form a stack. A nested rectangle is intersected with its parent.
- Pair every successful begin with
natiny_render_scissor_end(); nesting is limited to 16 levels.