Modules · Interface · Graphics
Graphics
Draw to a canvas. Graphics is the low-level drawing surface behind the interface — where Ui lays out components, Graphics paints shapes, paths and images directly onto a pixel canvas. Like everything in Program it is reactive: a drawing is a description built from values, and when those values change the canvas is repainted, so an animated or data-driven picture needs no redraw loop of your own.
How it fits
A Graphics drawing is expressed the same way as an interface: a block of drawing calls, nested by
indentation, that the runtime turns into paint operations each cycle. It draws in terms of the other
interface modules — coordinates and sizes are Maths.Real
values, fills and strokes are Colour values, and progress
driven by Animate can move a shape or fade a colour over time. Because a
shape's position or colour can be any reactive value, a chart that follows its data or a control that
follows a drag are both just drawings whose inputs change.
The full drawing-primitive reference (shapes, paths, transforms and images) is being finalised and will be listed here.