pub struct ResolvedBlock<'a> {
pub block: &'a BlockLayout,
pub origin_x: f32,
pub origin_y: f32,
}Expand description
A block’s layout together with the document-space origin its own coordinates are measured from.
block.y is relative to origin_y and the block’s line
geometry is relative to the block, so the absolute top of the block is
origin_y + block.y. For a block in the document’s own column both
origins are zero and block.y is already absolute — which is what keeps
this a widening of the old lookup rather than a change to it.
Fields§
§block: &'a BlockLayout§origin_x: f32Document-space x of the left edge of the block’s content column.
origin_y: f32Document-space y that block.y is measured from.
Auto Trait Implementations§
impl<'a> Freeze for ResolvedBlock<'a>
impl<'a> RefUnwindSafe for ResolvedBlock<'a>
impl<'a> Send for ResolvedBlock<'a>
impl<'a> Sync for ResolvedBlock<'a>
impl<'a> Unpin for ResolvedBlock<'a>
impl<'a> UnsafeUnpin for ResolvedBlock<'a>
impl<'a> UnwindSafe for ResolvedBlock<'a>
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