pub struct Layout {
pub glyphs: Vec<PlacedGlyph>,
pub rules: Vec<PlacedRule>,
pub paths: Vec<PlacedPath>,
pub width: f64,
pub height: f64,
pub depth: f64,
}Expand description
The final layout of a formula: flat positioned primitives plus overall
metrics. Everything is in ems of the base size, y-up, baseline at 0;
width spans the whole formula, height rises above the baseline,
depth extends below it (a positive number).
Fields§
§glyphs: Vec<PlacedGlyph>Every glyph, positioned.
rules: Vec<PlacedRule>Every rule, positioned.
paths: Vec<PlacedPath>Every drawn path, positioned.
width: f64Total advance width, ems.
height: f64Extent above the baseline, ems.
depth: f64Extent below the baseline, ems (positive).
Implementations§
Source§impl Layout
impl Layout
Sourcepub fn select(&self, range: Span) -> Selection
pub fn select(&self, range: Span) -> Selection
The primitives whose spans are contained in range — the substring
map (isolate / tex_to_color_map semantics).
Sourcepub fn select_touching(&self, range: Span) -> Selection
pub fn select_touching(&self, range: Span) -> Selection
The primitives whose spans overlap range — the inspector’s
hit-test semantics (what did this byte produce, in any part).
Trait Implementations§
impl StructuralPartialEq for Layout
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more