pub struct TextLayoutGeometry {
pub wrap_width_px: f32,
pub line_height_px: f32,
pub origin: (f32, f32),
}Expand description
Geometry the layout engine measured for a selectable Text node.
Published so hit testing wraps and measures lines exactly like the paint pass does, instead of re-deriving them from font size alone.
Fields§
§wrap_width_px: f32Width the text was wrapped into, in px.
line_height_px: f32Distance between consecutive line tops, in px.
origin: (f32, f32)Top-left of the text block, relative to the node’s top-left, in px.
Trait Implementations§
Source§impl Clone for TextLayoutGeometry
impl Clone for TextLayoutGeometry
impl Copy for TextLayoutGeometry
Source§impl Debug for TextLayoutGeometry
impl Debug for TextLayoutGeometry
Source§impl Default for TextLayoutGeometry
impl Default for TextLayoutGeometry
Source§impl PartialEq for TextLayoutGeometry
impl PartialEq for TextLayoutGeometry
impl StructuralPartialEq for TextLayoutGeometry
Auto Trait Implementations§
impl Freeze for TextLayoutGeometry
impl RefUnwindSafe for TextLayoutGeometry
impl Send for TextLayoutGeometry
impl Sync for TextLayoutGeometry
impl Unpin for TextLayoutGeometry
impl UnsafeUnpin for TextLayoutGeometry
impl UnwindSafe for TextLayoutGeometry
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