pub struct MsdfTile {
pub glyph_id: u16,
pub width: u32,
pub height: u32,
pub data: Vec<u8>,
pub bearing_x: f32,
pub bearing_y: f32,
pub advance_x: f32,
}Expand description
A rendered MSDF tile for a single glyph.
Fields§
§glyph_id: u16Glyph ID within the font.
width: u32Tile width in pixels.
height: u32Tile height in pixels.
data: Vec<u8>MSDF pixel data: width * height * 3 bytes (RGB, 3 bytes per pixel).
bearing_x: f32Left bearing in pixels.
bearing_y: f32Top bearing in pixels.
advance_x: f32Horizontal advance in pixels.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MsdfTile
impl RefUnwindSafe for MsdfTile
impl Send for MsdfTile
impl Sync for MsdfTile
impl Unpin for MsdfTile
impl UnsafeUnpin for MsdfTile
impl UnwindSafe for MsdfTile
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