#[repr(C)]pub struct GlyphInstance {
pub origin: [f32; 2],
pub axis_x: [f32; 2],
pub axis_y: [f32; 2],
pub uv: [f32; 4],
pub color: u32,
pub height: f32,
}Expand description
One glyph quad (instanced).
Fields§
§origin: [f32; 2]Bottom-left corner (local units).
axis_x: [f32; 2]Quad x edge (local units).
axis_y: [f32; 2]Quad y edge (local units).
uv: [f32; 4]Atlas rectangle [u0, v0, u1, v1].
color: u32Premultiplied RGBA8.
height: f32Text height (local units); glyphs smaller than a pixel are skipped.
Trait Implementations§
Source§impl Clone for GlyphInstance
impl Clone for GlyphInstance
Source§fn clone(&self) -> GlyphInstance
fn clone(&self) -> GlyphInstance
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 Copy for GlyphInstance
Source§impl Debug for GlyphInstance
impl Debug for GlyphInstance
Source§impl PartialEq for GlyphInstance
impl PartialEq for GlyphInstance
Source§fn eq(&self, other: &GlyphInstance) -> bool
fn eq(&self, other: &GlyphInstance) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Pod for GlyphInstance
impl StructuralPartialEq for GlyphInstance
Auto Trait Implementations§
impl Freeze for GlyphInstance
impl RefUnwindSafe for GlyphInstance
impl Send for GlyphInstance
impl Sync for GlyphInstance
impl Unpin for GlyphInstance
impl UnsafeUnpin for GlyphInstance
impl UnwindSafe for GlyphInstance
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.