About ads on Siafoo
Hide Siafoo is here to make coding less frustrating and to save you time. Learn More Join Siafoo

Nodebox Graphics State Tutorial Sample D, Push and Pop

In Brief: Yet another example from the Nodebox Graphics State tutorial .... more
Language Nodebox Python
# 's
 1rect(20, 20, 40, 40)
2
3push()
4
5rotate(45)
6rect(120, 20, 40, 40)
7
8pop()
9
10rect(220, 20, 40, 40)

Yet another example from the Nodebox Graphics State tutorial .

This toy snippet shows how to use the push() and pop() commands to selectively group graphical elements by state. See how the rectangle between the push() and pop() calls is rotated, but the rectangles drawn outside those statements are similarly outside of the state where the rotation occurred and thus are not rotated.

http://www.siafoo.net/image/86
License MIT license
Lines 6
Owner: Theodore Test
Group Owner: Nodebox Community
Viewable by Everyone
Editable by All Siafoo Users
Sponsored Links
About ads on Siafoo