1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

current transform?

Posted by jeff on Oct 31, 2008

How can I access the current transform state? I'd like to be able to send a test point through the transform stack in order to find out where it will end up on the canvas.


 
Posted by Stefan G on Nov 01, 2008

The current context's transform can be accessed by _ctx._transform

You could do something like:

rotate(45)
translate(40, 20)
print _ctx._transform.transformPoint((10, 0))



Posted by jeff on Nov 01, 2008

great, thanks!