Expand description
A display list, drawn.
[DrawOp]s arrive in screen space with every swatch resolved and every
font at the size it is drawn, so replaying one is a translation into
Canvas2D calls and nothing more. What a mark still needs from the host is
its text engine β which is Glyphs, the same value the kernel was
called with, so the diagram draws the layout the recorder measured β and
its images, which the registry was handed the bytes for when they arrived
in a hand-off.
StructsΒ§
- Nib π
- What every text mark is drawn through: the context, the frameβs swatches and the typeface.
- Run π
- What every text mark carries: the run, its face at screen size, its ink.
EnumsΒ§
- Repaint
- Whether the frame just drawn is the whole diagram, or whether something it named was not ready and another frame is owed once it is.
FunctionsΒ§
- ink π
- Fill every glyph of
laid, whereplaceputs its pen and turned byangle. - outline_
rect π - A rect, rounded where the display list asks for it.
roundRectis a recent addition to the API, so a browser without it falls back to arcs. - paint π
- Fill then outline the path already built on
ctx. A transparent swatch is no fill, and a stroke with no width or no colour is no outline β the same two nothings the egui backendβs strokes collapse to. - polyline π
- replay
- Draw
draw_listontoctx, in order, in CSS pixels. - rotated π
- A run rotated by
angleabout its ownanchorpoint, with the runβs top left corner atposβ the placementepaintβs anchored text shape makes of the same two values, so both backends rotate a pinβs label alike. - rows π
- A run inside the rect the recorder measured for it: the rows the layout broke it into, each glyph at the pen the layout placed it at.
- turn π
- The glyph matrix: font units (Y up) scaled to points and turned by
angle. - turned π
byturned byangle, clockwise on a screen whose y axis points down.