GUI Drawing
App: apps/gui_drawing/
Demonstrates every Gui.draw* canvas primitive rendered directly inside a window. Shapes are laid out in a 3×3 grid; some animate over time using Math.sin. All colors are 0–255.
Run from root
Section titled “Run from root”% ./plume3d gui_drawingWhat it shows
Section titled “What it shows”Each primitive in a labelled cell:
| Primitive | Method |
|---|---|
| Animated thick line | drawLine |
| Outlined rect with rounding | drawRect |
| Filled rect (animated color) | drawRectFilled |
| Outlined ellipse | drawCircle |
| Filled ellipse (animated) | drawCircleFilled |
| Filled triangle | drawTriangleFilled |
| Arc stroke | drawArc |
| Filled arc/pie | drawArcFilled |
| Text at position | drawText |
| Cubic bezier curve | drawCurve |
Key patterns
Section titled “Key patterns”// Coordinates are window-local; colors are 0-255Gui.drawLine(10, 10, 90, 70, 3, 255, 100, 100, 255)Gui.drawRectFilled(120, 10, 100, 60, 5, 100, 180, 255, 255)Gui.drawCircle(240, 10, 70, 70, 2, 255, 200, 50, 255)Gui.drawTriangleFilled(340, 70, 380, 10, 420, 70, 80, 220, 80, 255)
// Animated pulsevar t = Math.sin(_time * 3)Gui.drawArcFilled(60, 160, 30, 0, t * 3.14, 255, 150, 50, 255)
// Bezier curveGui.drawCurve(10, 200, 60, 140, 120, 260, 180, 200, 2, 200, 100, 255, 255)Note on coordinate system
Section titled “Note on coordinate system”All draw* coordinates are relative to the content region of the current window, not the screen. Use Gui.windowGetContentRegion() to get the region origin if needed.