#[non_exhaustive]pub struct BlockVisualInfo {
pub block_id: usize,
pub x: f32,
pub y: f32,
pub height: f32,
}Expand description
Visual position and size of a laid-out block.
Returned by crate::DocumentFlow::block_visual_info.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.block_id: usizeBlock ID (matches BlockSnapshot::block_id).
x: f32X position of the left edge of the block’s content column, relative to the document start, in pixels.
Zero for a block in the document’s own column. A block inside a table cell or a frame has its own left origin — column 1 of a table does not start at the document’s left edge — so anything placing a rectangle around the block’s text has to start here rather than at zero.
y: f32Y position of the block’s top edge relative to the document start, in pixels.
height: f32Total height of the block including margins, in pixels.
Auto Trait Implementations§
impl Freeze for BlockVisualInfo
impl RefUnwindSafe for BlockVisualInfo
impl Send for BlockVisualInfo
impl Sync for BlockVisualInfo
impl Unpin for BlockVisualInfo
impl UnsafeUnpin for BlockVisualInfo
impl UnwindSafe for BlockVisualInfo
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