Hide
Siafoo is here to make coding less frustrating and to save you time. Join Siafoo Now or Learn More

Nodebox Graphics State Tutorial Sample B, Location Atom Feed 0

In Brief A Nodebox code sample from the Graphics State portion of the tutorial. It demonstrates the persistent state concept in Nodebox with regards to location.... more
# 's
1rect(20,40,80,80)
2
3translate(100,100)
4rect(20,40,80,80)
5
6translate(100,100)
7rect(20,40,80,80)

A Nodebox code sample from the Graphics State portion of the tutorial. It demonstrates the persistent state concept in Nodebox with regards to location.

Note that the only difference between the various rectangle calls is Nodebox's state at the time of each call. In particular, the translate function has shifted the 'origin point' of Nodebox drawings.

http://www.siafoo.net/image/84