Automation

Everything RustFig does is a command with an id (for example shape.rectangle, transform.rotate, tool.chop). The menus, keys and mode buttons all run commands, and so can programs.

Coordinates in commands are Fig units: 1200 per inch, 450 per centimetre in metric drawings, y growing downwards. Mutating commands are atomic and one undo step each.

To open a manual page from a script: {"method":"ui.run","params":{"command":"help.open","params":{"topic":"chop.md"}}}.