pub struct GlyphExtents<T> {
pub x_bearing: T,
pub y_bearing: T,
pub width: T,
pub height: T,
}Expand description
Where a glyph’s ink sits, relative to its origin.
A bearing and a size rather than two corners, which is the shape the metrics built on it use.
Fields§
§x_bearing: TDistance from the origin to the left edge of the ink.
y_bearing: TDistance from the origin to the top edge of the ink.
width: TWidth of the ink, rightward from x_bearing.
height: THeight of the ink, downward from y_bearing.
Never negative. A caller whose own extents count upward negates it.
Trait Implementations§
Source§impl<T> Clone for GlyphExtents<T>where
T: Clone,
impl<T> Clone for GlyphExtents<T>where
T: Clone,
Source§fn clone(&self) -> GlyphExtents<T>
fn clone(&self) -> GlyphExtents<T>
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 moreimpl<T> Copy for GlyphExtents<T>where
T: Copy,
Source§impl<T> Debug for GlyphExtents<T>where
T: Debug,
impl<T> Debug for GlyphExtents<T>where
T: Debug,
Source§impl<T> Default for GlyphExtents<T>where
T: Default,
impl<T> Default for GlyphExtents<T>where
T: Default,
Source§fn default() -> GlyphExtents<T>
fn default() -> GlyphExtents<T>
Returns the “default value” for a type. Read more
impl<T> Eq for GlyphExtents<T>where
T: Eq,
Source§impl<T> From<BoundingBox<T>> for GlyphExtents<T>
impl<T> From<BoundingBox<T>> for GlyphExtents<T>
Source§fn from(bounds: BoundingBox<T>) -> GlyphExtents<T>
fn from(bounds: BoundingBox<T>) -> GlyphExtents<T>
Converts the corners of a box into a bearing and a size.
The corners can be in either order. A reversed box still produces a non-negative size.
Source§impl<T> PartialEq for GlyphExtents<T>where
T: PartialEq,
impl<T> PartialEq for GlyphExtents<T>where
T: PartialEq,
impl<T> StructuralPartialEq for GlyphExtents<T>where
T: PartialEq,
Auto Trait Implementations§
impl<T> Freeze for GlyphExtents<T>where
T: Freeze,
impl<T> RefUnwindSafe for GlyphExtents<T>where
T: RefUnwindSafe,
impl<T> Send for GlyphExtents<T>where
T: Send,
impl<T> Sync for GlyphExtents<T>where
T: Sync,
impl<T> Unpin for GlyphExtents<T>where
T: Unpin,
impl<T> UnsafeUnpin for GlyphExtents<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for GlyphExtents<T>where
T: UnwindSafe,
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