Struct allsorts::bitmap::BitmapGlyph
source · 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: Metrics
Glyph metrics in pixels.
bitmap: Bitmap
Bitmap 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
§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
§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