Skip to content

cf_draw_push

Category: draw
GitHub: cute_draw.h


Save a copy of this coordinate system.

void cf_draw_push();

Remarks

This function is essential for drawing things locally without affecting the coordinate system of anything else that needs to draw. For example, you may push/pop to modify the coordinate system before drawing, and restore the prior coordinate system when done:

cf_draw_push(); // Save a copy of the prior coordinate system.
cf_draw_translate(100, 0);
cf_draw_rotate(CF_PI/3.0f);
cf_draw_line(a, b); // Draw using the previous translate then rotate.
cf_draw_pop(); // Restore the prior coordinate system.

cf_draw_TSR
cf_draw_pop
cf_draw_peek
cf_draw_translate
cf_draw_transform
cf_draw_translate
cf_draw_scale
cf_draw_rotate