Struct BitmapGlyph
pub struct BitmapGlyph<'a> {
pub data: BitmapData<'a>,
pub bearing_x: f32,
pub bearing_y: f32,
pub inner_bearing_x: f32,
pub inner_bearing_y: f32,
pub ppem_x: f32,
pub ppem_y: f32,
pub advance: Option<f32>,
pub width: u32,
pub height: u32,
pub placement_origin: Origin,
}Expand description
An embedded bitmap glyph.
Fields§
§data: BitmapData<'a>The underlying data of the bitmap glyph.
bearing_x: f32Outer glyph bearings in the x direction, given in font units.
bearing_y: f32Outer glyph bearings in the y direction, given in font units.
inner_bearing_x: f32Inner glyph bearings in the x direction, given in pixels. This value should be scaled
by ppem_* and be applied as an offset when placing the image within the bounds rectangle.
inner_bearing_y: f32Inner glyph bearings in the y direction, given in pixels. This value should be scaled
by ppem_* and be applied as an offset when placing the image within the bounds rectangle.
ppem_x: f32The assumed pixels-per-em in the x direction.
ppem_y: f32The assumed pixels-per-em in the y direction.
advance: Option<f32>The horizontal advance width of the bitmap glyph in pixels, if given.
width: u32The number of columns in the bitmap.
height: u32The number of rows in the bitmap.
placement_origin: OriginThe placement origin of the bitmap.
Trait Implementations§
§impl<'a> Clone for BitmapGlyph<'a>
impl<'a> Clone for BitmapGlyph<'a>
§fn clone(&self) -> BitmapGlyph<'a>
fn clone(&self) -> BitmapGlyph<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for BitmapGlyph<'a>
impl<'a> RefUnwindSafe for BitmapGlyph<'a>
impl<'a> Send for BitmapGlyph<'a>
impl<'a> Sync for BitmapGlyph<'a>
impl<'a> Unpin for BitmapGlyph<'a>
impl<'a> UnsafeUnpin for BitmapGlyph<'a>
impl<'a> UnwindSafe for BitmapGlyph<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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