# NodeBox

Create visual output with Python programming code
Home Download Reference Tutorial Library Gallery About

# Reference | reset()

Syntax |
    reset()
Description | Resets all transformations to their default values. NodeBox is a so-called state-machine. For example, once rotate(90) is called, all subsequent shapes, paths, text and images are rotated 90 degrees. The rotation state is 90 degrees. If rotate() is called again, for example rotate(30), the rotation state becomes 120 degrees (90+30). Once reset() is called, the rotation state becomes 0 degrees (the default rotation) again.
Example |
    rotate(45)
    text("45 degrees", 50, 80)
    push()
    rotate(-30)
    text("15", 50, 50)
    pop()
    text("45 degrees...", 50, 60)