Skip to main content

Module replay

Module replay 

Source
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 epaint shapes and nothing more. What a mark still needs from the host is its text engine — a run is drawn row by row from a fresh layout, so the glyphs are the context’s own — and its image loader, which the registry handed the bytes to when they arrived in a hand-off.

Structs§

Run 🔒
What every text mark carries: the run, its face at screen size, its ink.

Constants§

MAX_RASTER 🔒
Cap on the pixel size an SVG/PNG is rasterized to, so a hugely zoomed image can’t ask the loader for an enormous texture.

Functions§

image 🔒
An image filling rect. The texture is pulled from egui’s loader by the URI registered under hash; on the first frames the loader may still be rasterizing, so a repaint is asked for until it is Ready. A hash the registry does not hold is a hand-off the front end dropped: nothing is drawn, and the frame says so.
replay
The shapes that draw draw_list, in order, laid out through painter’s fonts. images holds the loader URI of every asset the front end has registered from a hand-off.
rotated 🔒
A run rotated by angle radians about pos via anchor, nudged by the residual between epaint’s pixel-snapped baseline and the font’s unrounded ascent so the run moves continuously as zoom sweeps.
rows 🔒
Draw a run row by row inside the rect the recorder measured for it.
stroke_of 🔒