pub struct Linebreaker {
pub target_width: f64,
}Expand description
Line-breaking configuration.
Fields§
§target_width: f64Target line width in “em” units.
Implementations§
Source§impl Linebreaker
impl Linebreaker
pub fn new(target_width: f64) -> Self
Sourcepub fn best_fit_to_width(&self, node: &NodeData) -> Layout
pub fn best_fit_to_width(&self, node: &NodeData) -> Layout
Find the best layout for a MathML expression that fits within target width.
Port of Linebreaker::bestFitToWidth.
Sourcepub fn apply_layout(&self, node: &NodeData, layout: &Layout) -> NodeData
pub fn apply_layout(&self, node: &NodeData, layout: &Layout) -> NodeData
Apply a layout’s breaks to a MathML expression.
Port of Linebreaker::applyLayout.
Auto Trait Implementations§
impl Freeze for Linebreaker
impl RefUnwindSafe for Linebreaker
impl Send for Linebreaker
impl Sync for Linebreaker
impl Unpin for Linebreaker
impl UnsafeUnpin for Linebreaker
impl UnwindSafe for Linebreaker
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