Skip to content

Clear Window

Mikkel102454 edited this page Oct 6, 2026 · 2 revisions

clear_window

Fill a rectangular region.

Arguments

All listed arguments are required.

Name Type Meaning
x_start, y_start integer Start coordinates
x_end, y_end integer End coordinates
color string Opaque palette color

Example

{
  "cmd": "clear_window",
  "args": {
    "x_start": 10,
    "y_start": 10,
    "x_end": 40,
    "y_end": 60,
    "color": "red"
  }
}

Behavior

All supplied coordinates must be inside the display. Use ordered corners. The current handler adds 1 to both corners, and the canvas uses exclusive end bounds: this example paints X 11–40 and Y 11–60 before transforms. The painted size is x_end - x_start by y_end - y_start. It does not include both protocol endpoints.

See Command Reference, Color Palette, and Renderer Notes.

Implementation references

Clone this wiki locally