Expand description
Scene → pixels. The engine lays a scene out once (taffy, parley) and
turns it into a display list of vello drawing commands; a backend draws
the list — vello_cpu here, for the PNG.
Structs§
- Difference
- How two drawings of the same size differ.
- Drawing
- A scene laid out and ready to paint: every node’s box in tree order, the design’s drawing, the commands that paint it, and the images they paint.
- Frame
- A node’s box after layout, in the scene’s pixels.
- Renderer
- The fonts and text layout state a renderer keeps between paints.
- Undrawable
- Why a scene can’t be drawn: too big a drawing, or images and shadows that
don’t fit the GPU’s atlas —
atthe attribute that broke it, when one did.
Enums§
- Draw
- One drawing command, in scene pixels: what both vello backends replay. Every decision about the drawing is made before a command is made; a backend only translates it into its library’s call.
- Paint
- What a
Draw::Fillcovers its path with.
Constants§
- CLUSTER
- The largest cluster of touching unexplained pixels.
- EDGE
- A PNG’s or JPEG’s pixels, straight RGBA.
How far apart two drawings of the same scene may be. Two rasterizers of one
display list differ only in how they anti-alias an edge: a pixel on an edge
takes some value between the colors either side of it, and each rasterizer
picks a slightly different one. So a pixel is unexplained when, in some
channel, its value lies more than
EDGEoutside the range of the other drawing’s pixels around it (itself and its eight neighbours), in either direction. A missing or moved part — a divider, an icon, a word — leaves pixels no neighbour in the other drawing explains. At mostSHAREof the pixels may be unexplained, and no 8-connected cluster of them may be larger thanCLUSTER. - MAX_
SIDE - The largest drawing a design may have, in pixels a side at 1×: far beyond any screen, and a PNG of it still fits in memory.
- SHARE
- The largest share of pixels that may be unexplained.
Functions§
- compare
- How two RGBA buffers
widthpixels wide differ;Nonewhen their sizes differ. - matches
- Whether two RGBA buffers
widthpixels wide are the same drawing within the tolerance; otherwise how they differ, orNonefor different sizes. - paint_
list - Replays a display list with
vello_cpuinto a pixmap of its area atscale, asRenderer::paintdoes. - pixels
- A PNG’s or JPEG’s pixels as straight RGBA, with its width and height — for comparing drawings.