Drawing Commands
Line Commands
line
Draws a line between two points.
line x1 y1 x2 y2Example:
line 10 10 -10 -10 // Draws a diagonal linecont
Continues a line from the last point of the previous line.
cont x yExample:
line 10 10 -10 -10
cont 10 -10 // Continues from (-10, -10) to (10, -10)Style Commands
c (color)
Sets the color for subsequent drawing operations.
c #hexcodeExample:
c #fff // Sets color to white
c #ff0000 // Sets color to redw (weight)
Sets the line weight for subsequent drawing operations.
w numberExample:
w 2 // Sets line weight to 2 pixelsShape Commands
square
Draws a square outline at the specified position.
square x y width heightExample:
square 0 0 20 20 // Draws a 20x20 square centered at origindot
Draws a single dot at the specified position.
dot x yExample:
dot 15 15 // Draws a dot at (15, 15)cutcircle
Draws a partial circle outline.
cutcircle x y size angle filledParameters:
x, y: Center position
size: Radius
angle: Rotation (0-36)
filled: Arc length in degrees (0-360)
Example:
cutcircle 0 0 10 0 180 // Draws a semicircleellipse
Draws an ellipse.
ellipse x y width height_multiplier directionParameters:
x, y: Center position
width: Base width
height_multiplier: Height relative to width
direction: Rotation angle
Example:
ellipse 0 0 20 1.5 45 // Draws a rotated ellipseLast updated
Was this helpful?