Don't get spied on – We respect your privacy and provide numerous options to protect it.
Join Siafoo Now
or
Learn More
Nodebox Graphics State Tutorial Sample D, Push and Pop
Updated about 1 year ago (09 Aug 2008 at 05:34 AM)
recent activity
| 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.
Add a Comment