pub struct NodeRects {
pub border: [f32; 4],
pub padding: [f32; 4],
pub content: [f32; 4],
pub text_width: f32,
pub text_height: f32,
pub font_size: f32,
pub font_pixels: f32,
pub truncated: bool,
pub overflow: bool,
pub line_count: Option<u32>,
pub baselines: Option<[f32; 2]>,
}Expand description
One node’s boxes in render pixels, [left, top, right, bottom], whole pixels from the
picture’s top-left.
Fields§
§border: [f32; 4]The border box.
padding: [f32; 4]The padding box.
content: [f32; 4]The content box.
text_width: f32The unrounded content width a text breaks at, before the slack.
text_height: f32The unrounded content height a text fits and is clamped in, before the slack.
font_size: f32A text node’s font size as a fraction of the picture’s shorter side, fitted when it
has a font_size_fit (fit_texts). Zero for other nodes.
font_pixels: f32A text node’s font size in pixels, as the text host draws it.
truncated: boolWhether a text node’s line_clamp discarded lines.
overflow: boolWhether it overflows, as NodeBounds::overflow says.
line_count: Option<u32>A text node’s line count, zero for empty text.
baselines: Option<[f32; 2]>A text node’s first and last baselines in pixels from the picture’s top. None for
other nodes and empty text.
Trait Implementations§
impl Copy for NodeRects
impl StructuralPartialEq for NodeRects
Auto Trait Implementations§
impl Forget for NodeRects
impl Freeze for NodeRects
impl Move for NodeRects
impl RefUnwindSafe for NodeRects
impl Send for NodeRects
impl Sync for NodeRects
impl Unpin for NodeRects
impl UnsafeUnpin for NodeRects
impl UnwindSafe for NodeRects
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