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 B, Location

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
Language Nodebox Python
# '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
License MIT license
Lines 5
Owner: Theodore Test
Group Owner: Nodebox Community
Viewable by Everyone
Editable by All Siafoo Users
Sponsored Links
About ads on Siafoo