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.
Included in this Library
Lines
6
Viewable by Everyone
Sponsored Links
Add a Comment