pub struct GlyphPosition {
pub byte_offset: usize,
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
}Expand description
The position of a single glyph cluster in the laid-out text.
Fields§
§byte_offset: usizeUTF-8 byte offset of this glyph’s cluster in the source text.
x: f32Left edge in canvas pixels.
y: f32Top edge in canvas pixels (baseline − ascent).
width: f32Advance width of the glyph in pixels.
height: f32Line height in pixels (ascent + descent).
Trait Implementations§
Source§impl Clone for GlyphPosition
impl Clone for GlyphPosition
Source§fn clone(&self) -> GlyphPosition
fn clone(&self) -> GlyphPosition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GlyphPosition
impl Debug for GlyphPosition
Source§impl PartialEq for GlyphPosition
impl PartialEq for GlyphPosition
Source§fn eq(&self, other: &GlyphPosition) -> bool
fn eq(&self, other: &GlyphPosition) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GlyphPosition
Auto Trait Implementations§
impl Freeze for GlyphPosition
impl RefUnwindSafe for GlyphPosition
impl Send for GlyphPosition
impl Sync for GlyphPosition
impl Unpin for GlyphPosition
impl UnsafeUnpin for GlyphPosition
impl UnwindSafe for GlyphPosition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more