Hide
Bored? Check out the Recent Activity on Siafoo Join Siafoo Now or Learn More

Nodebox Graphics State Tutorial Sample D, Push and Pop Atom Feed 0

In Brief Yet another example from the Nodebox Graphics State tutorial .... more
# '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