#[non_exhaustive]pub enum Item {
Glyph {
id: GlyphId,
x: f32,
y: f32,
size: f32,
advance: f32,
color: Option<Color>,
mirrored: bool,
},
Rule {
x: f32,
y: f32,
w: f32,
h: f32,
color: Option<Color>,
},
Background {
x: f32,
y: f32,
w: f32,
h: f32,
color: Color,
},
}Expand description
One drawable in the display list.
Consumers must honor every field to render correctly: in particular
Item::Glyph::mirrored — ignoring it draws right-to-left radicals
backwards — and item order, which is painter’s order (backgrounds are
emitted before the content they sit behind).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Glyph
A glyph from the math font, positioned at its baseline origin (x, y),
to be rasterized at font size size (same unit as everything else;
differs from the top-level font size inside scripts). color: None
means the consumer’s text color, so unstyled math matches the
surrounding text.
Fields
Rule
A filled rectangle (fraction bars, radical rules, merror borders).
(x, y) is the top-left corner; h extends downward. color: None
means the consumer’s text color.
Background
A mathbackground fill behind part of the formula. Emitted before
the items it sits behind, so drawing in list order is correct.