Axidraw

class Axidraw(val program: Program, paperSize: PaperSize, orientation: PaperOrientation = PaperOrientation.PORTRAIT)(source)

Class to talk to the axicli command line program

Constructors

Link copied to clipboard
constructor(program: Program, paperSize: PaperSize, orientation: PaperOrientation = PaperOrientation.PORTRAIT)

Properties

Link copied to clipboard
Link copied to clipboard
val actualPaperSize: Vector2
Link copied to clipboard

API URL to call once plotting is complete. If the string contains [filename] it will be replaced by the name of the file being plotted. This URL should be URL encoded (for instance use %20 instead of a space).

Link copied to clipboard
val bounds: Rectangle

Returns the bounds of the drawable area so user code can draw things whithout leaving the paper.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var margin: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val program: Program
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var svg: String

Read-only String variable to inspect the current design in SVG format for debugging purposes.

Link copied to clipboard

Functions

Link copied to clipboard
fun clear(): Unit?

Clears the current design wiping any shapes the user might have added.

Link copied to clipboard
fun display(drawer: Drawer)

Display the composition using drawer.

Link copied to clipboard

The core method that allows the user to append content to the design. Use any methods and properties like contour(), segment(), fill, stroke, etc.

Link copied to clipboard
fun goHome()

After hitting pause, use this to move the pen home

Link copied to clipboard

Rebuilds the design putting shapes under groups based on stroke colors and inserts a pause after each group.

Link copied to clipboard
fun onLoad()
Link copied to clipboard
fun onPlot()

Plot design using the current settings

Link copied to clipboard
fun onSave()

Save current design as SVG

Link copied to clipboard
fun resizeWindow(ppi: Double = 96.0)

Resizes the program window to match the paper size according to the ppi (Pixels Per Inch) value.

Link copied to clipboard
fun resume()

After hitting pause, use this to continue plotting

Link copied to clipboard
Link copied to clipboard
fun sysInfo()

Display Axidraw system info

Link copied to clipboard

Toggle the pen up/down state by powering the pen plotter servo. Useful for calibrating the pen height. Cover the paper with a plastic sheet before running this command to avoid accidentally leaving ink on the paper.

Link copied to clipboard
fun version()

Display Axidraw software version