Skip to content

Command Reference

Mikkel edited this page May 6, 2026 · 4 revisions

Command Reference

This page provides an index of all drawing commands supported by the JSON Drawing Protocol.

Each command has its own dedicated documentation page containing:

  • Description
  • Arguments
  • Rendering behavior
  • Examples
  • Notes
  • Renderer considerations

Command Structure

All commands follow the same basic structure:

{
  "cmd": "command_name",
  "args": {}
}
Field Description
cmd Command identifier
args Command-specific arguments

See:


Display Commands

Commands related to framebuffer clearing and region operations.

Command Description
clear Clears the entire display
clear_window Clears a rectangular region

Primitive Drawing Commands

Commands used for drawing geometric primitives.

Command Description
draw_point Draws a pixel or block
draw_line Draws a line between two points
draw_rectangle Draws a rectangle
draw_circle Draws a circle

Text Rendering Commands

Commands used for rendering text and numeric values.

Command Description
draw_string Draws a text string

Image Commands

Commands related to indexed image rendering.

Command Description
draw_image Draws a packed indexed image

Rendering Rules

All commands follow these rendering rules:

  • Commands execute sequentially
  • Later commands overwrite earlier pixels
  • Drawing outside bounds may be clipped
  • Transparent pixels are skipped where supported

Related Pages

Clone this wiki locally