Skip to content

Vibe coding a plugin? 😎 Teach your agent Modlumi first. Works with Claude Code, Codex, Cursor and more.

Canvas

Draws shapes on a canvas of Ui.canvas. Later shapes draw over earlier ones and are hit first.

circle(center, radius, style?): void

CanvasPoint

number

CanvasStyle

void


line(points, style?): void

readonly CanvasPoint[]

CanvasStyle

void


polygon(points, style?): void

readonly CanvasPoint[]

CanvasStyle

void


rect(x, y, width, height, style?): void

number

number

number

number

CanvasStyle

void


text(position, text, style?): void

Text whose top-left corner is position, in the theme’s text color unless stroked.

CanvasPoint

unknown

CanvasStyle

void