pub struct BlockLayout {
pub block_id: usize,
pub position: usize,
pub lines: Vec<LayoutLine>,
pub y: f32,
pub height: f32,
pub top_margin: f32,
pub bottom_margin: f32,
pub left_margin: f32,
pub right_margin: f32,
pub list_marker: Option<ShapedListMarker>,
pub background_color: Option<[f32; 4]>,
}Expand description
Computed layout for a single block (paragraph).
Fields§
§block_id: usize§position: usizeDocument character position of the block start.
lines: Vec<LayoutLine>Laid out lines within the block.
y: f32Top edge relative to document start (set by flow layout).
height: f32Total height: top_margin + sum(line heights) + bottom_margin.
top_margin: f32§bottom_margin: f32§left_margin: f32§right_margin: f32§list_marker: Option<ShapedListMarker>Shaped list marker (positioned to the left of the content area). None if the block is not a list item.
background_color: Option<[f32; 4]>Block background color (RGBA). None means transparent.
Auto Trait Implementations§
impl Freeze for BlockLayout
impl RefUnwindSafe for BlockLayout
impl Send for BlockLayout
impl Sync for BlockLayout
impl Unpin for BlockLayout
impl UnsafeUnpin for BlockLayout
impl UnwindSafe for BlockLayout
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