Skip to content

Draw Line

Mikkel102454 edited this page Oct 6, 2026 · 2 revisions

draw_line

Draw a line between two points.

Arguments

All listed arguments are required.

Name Type Meaning
x_start, y_start integer Start point
x_end, y_end integer End point
color string Opaque palette color
width string 1x1, 2x2, 3x3, or 4x4
style string solid or dotted

Example

{
  "cmd": "draw_line",
  "args": {
    "x_start": 20,
    "y_start": 70,
    "x_end": 70,
    "y_end": 120,
    "color": "black",
    "width": "1x1",
    "style": "solid"
  }
}

Behavior

Both endpoints must be inside the display; an out-of-bounds endpoint rejects the command instead of clipping the line. Width selects the canvas point-thickness mode. Dotted gaps are painted white by the current canvas, rather than left transparent.

See Command Reference, Color Palette, and Renderer Notes.

Implementation references

Clone this wiki locally