pub struct SimpleGlyph<'a> {
pub bounding_box: BoundingBox,
pub end_pts_of_contours: Vec<u16>,
pub instructions: &'a [u8],
pub coordinates: Vec<(SimpleGlyphFlag, Point)>,
pub phantom_points: Option<Box<PhantomPoints>>,
}Fields§
§bounding_box: BoundingBox§end_pts_of_contours: Vec<u16>§instructions: &'a [u8]§coordinates: Vec<(SimpleGlyphFlag, Point)>§phantom_points: Option<Box<PhantomPoints>>Phantom points, only populated when applying glyph variation deltas
Implementations§
Source§impl<'a> SimpleGlyph<'a>
impl<'a> SimpleGlyph<'a>
pub fn number_of_contours(&self) -> i16
pub fn contours(&self) -> impl Iterator<Item = &[(SimpleGlyphFlag, Point)]>
pub fn bounding_box(&self) -> BoundingBox
Trait Implementations§
Source§impl<'a> Clone for SimpleGlyph<'a>
impl<'a> Clone for SimpleGlyph<'a>
Source§fn clone(&self) -> SimpleGlyph<'a>
fn clone(&self) -> SimpleGlyph<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for SimpleGlyph<'a>
impl<'a> Debug for SimpleGlyph<'a>
Source§impl<'a> From<SimpleGlyph<'a>> for GlyfRecord<'a>
impl<'a> From<SimpleGlyph<'a>> for GlyfRecord<'a>
Source§fn from(glyph: SimpleGlyph<'a>) -> GlyfRecord<'a>
fn from(glyph: SimpleGlyph<'a>) -> GlyfRecord<'a>
Converts to this type from the input type.
Source§impl<'a> PartialEq for SimpleGlyph<'a>
impl<'a> PartialEq for SimpleGlyph<'a>
Source§impl<'b> ReadBinaryDep for SimpleGlyph<'b>
impl<'b> ReadBinaryDep for SimpleGlyph<'b>
Source§impl<'a> WriteBinary for SimpleGlyph<'a>
impl<'a> WriteBinary for SimpleGlyph<'a>
Source§fn write<C: WriteContext>(
ctxt: &mut C,
glyph: SimpleGlyph<'_>,
) -> Result<(), WriteError>
fn write<C: WriteContext>( ctxt: &mut C, glyph: SimpleGlyph<'_>, ) -> Result<(), WriteError>
Write the binary representation of Self to
ctxt.impl<'a> StructuralPartialEq for SimpleGlyph<'a>
Auto Trait Implementations§
impl<'a> Freeze for SimpleGlyph<'a>
impl<'a> RefUnwindSafe for SimpleGlyph<'a>
impl<'a> Send for SimpleGlyph<'a>
impl<'a> Sync for SimpleGlyph<'a>
impl<'a> Unpin for SimpleGlyph<'a>
impl<'a> UnwindSafe for SimpleGlyph<'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
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 moreSource§impl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
impl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
Source§type Output = <T as WriteBinary<HostType>>::Output
type Output = <T as WriteBinary<HostType>>::Output
The type of the value returned by
write_dep.Source§fn write_dep<C>(
ctxt: &mut C,
val: HostType,
_: <T as WriteBinaryDep<HostType>>::Args,
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError>where
C: WriteContext,
fn write_dep<C>(
ctxt: &mut C,
val: HostType,
_: <T as WriteBinaryDep<HostType>>::Args,
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError>where
C: WriteContext,
Write the binary representation of Self to
ctxt.