pub struct LayoutBox {
pub width: f64,
pub height: f64,
pub depth: f64,
pub content: BoxContent,
pub color: Color,
}Expand description
A TeX box: the fundamental unit of layout.
Every mathematical element is represented as a box with three dimensions:
width: horizontal extentheight: ascent above baselinedepth: descent below baseline
All values are in em units relative to the current font size.
Fields§
§width: f64§height: f64§depth: f64§content: BoxContent§color: ColorImplementations§
Source§impl LayoutBox
impl LayoutBox
pub fn new_empty() -> Self
pub fn new_kern(width: f64) -> Self
pub fn new_rule( width: f64, height: f64, depth: f64, thickness: f64, raise: f64, ) -> Self
pub fn total_height(&self) -> f64
pub fn with_color(self, color: Color) -> Self
Sourcepub fn with_adjusted_delim(self, height: f64, depth: f64) -> Self
pub fn with_adjusted_delim(self, height: f64, depth: f64) -> Self
Adjust height/depth for a delimiter to match a target size.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LayoutBox
impl RefUnwindSafe for LayoutBox
impl Send for LayoutBox
impl Sync for LayoutBox
impl Unpin for LayoutBox
impl UnsafeUnpin for LayoutBox
impl UnwindSafe for LayoutBox
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