pub struct BitmapGlyph {
pub ppem_x: Option<u16>,
pub ppem_y: Option<u16>,
pub metrics: Metrics,
pub bitmap: Bitmap,
}Expand description
A bitmap glyph with metrics.
Fields§
§ppem_x: Option<u16>Horizontal pixels per em.
Will be None if image data is a vector image.
ppem_y: Option<u16>Vertical pixels per em.
Will be None if image data is a vector image.
metrics: MetricsGlyph metrics in pixels.
bitmap: BitmapBitmap data.
Trait Implementations§
Source§impl<'a> From<(&SbixStrike<'a>, &SbixGlyph<'a>)> for BitmapGlyph
impl<'a> From<(&SbixStrike<'a>, &SbixGlyph<'a>)> for BitmapGlyph
Source§fn from((strike, glyph): (&SbixStrike<'a>, &SbixGlyph<'a>)) -> Self
fn from((strike, glyph): (&SbixStrike<'a>, &SbixGlyph<'a>)) -> Self
Converts to this type from the input type.
Source§impl<'a> TryFrom<&SVGDocumentRecord<'a>> for BitmapGlyph
impl<'a> TryFrom<&SVGDocumentRecord<'a>> for BitmapGlyph
Source§type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
Source§fn try_from(svg_record: &SVGDocumentRecord<'a>) -> Result<Self, ParseError>
fn try_from(svg_record: &SVGDocumentRecord<'a>) -> Result<Self, ParseError>
Performs the conversion.
Source§impl<'a> TryFrom<(&BitmapInfo, GlyphBitmapData<'a>)> for BitmapGlyph
impl<'a> TryFrom<(&BitmapInfo, GlyphBitmapData<'a>)> for BitmapGlyph
Source§type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
Source§fn try_from(
(info, glyph): (&BitmapInfo, GlyphBitmapData<'a>),
) -> Result<Self, Self::Error>
fn try_from( (info, glyph): (&BitmapInfo, GlyphBitmapData<'a>), ) -> Result<Self, Self::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for BitmapGlyph
impl RefUnwindSafe for BitmapGlyph
impl Send for BitmapGlyph
impl Sync for BitmapGlyph
impl Unpin for BitmapGlyph
impl UnwindSafe for BitmapGlyph
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> 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