Skip to main content

Pass

Struct Pass 

Source
struct Pass<'a, 's, 'buf, 'hint, S: Scale> {
Show 13 fields context: &'a dyn OutlineContext<'a>, scale: &'s S, varies: bool, coords: &'s [F2Dot14], gvar_scalars: &'s [Fixed], has_hvar: bool, buffers: Buffers<'buf, S>, point_count: usize, contour_count: usize, component_delta_count: usize, phantom: [Point<S::Coord>; 4], hinter: Option<&'hint mut dyn Hinter<S::Coord>>, is_hinted: bool,
}

Fields§

§context: &'a dyn OutlineContext<'a>§scale: &'s S§varies: bool§coords: &'s [F2Dot14]§gvar_scalars: &'s [Fixed]§has_hvar: bool§buffers: Buffers<'buf, S>§point_count: usize§contour_count: usize§component_delta_count: usize§phantom: [Point<S::Coord>; 4]§hinter: Option<&'hint mut dyn Hinter<S::Coord>>§is_hinted: bool

Implementations§

Source§

impl<'a, 's, 'buf, S: Scale> Pass<'a, 's, 'buf, '_, S>

Source

fn finish(self) -> OutlineRef<'buf, S::Coord>

Source

fn load( &mut self, glyph: &Option<Glyph<'a>>, gid: GlyphId, recurse_depth: usize, ) -> Result<(), Error>

Source

fn setup_phantom_points(&mut self, glyph: &Option<Glyph<'a>>, gid: GlyphId)

Source

fn load_empty(&mut self, gid: GlyphId) -> Result<(), Error>

Source

fn read_contours( &mut self, glyph: &SimpleGlyph<'a>, ) -> Result<Range<usize>, Error>

Copies a glyph’s contour end points into the buffer, checking that they ascend, and returns the range they occupy.

They stay relative to the glyph until its points have been loaded; see the end of Self::load_simple.

Source

fn load_simple( &mut self, glyph: &SimpleGlyph<'a>, gid: GlyphId, ) -> Result<(), Error>

Source

fn hint_glyph( &mut self, bytecode: &'a [u8], points_start: usize, contours_range: Range<usize>, phantom_offset: usize, gid: GlyphId, is_composite: bool, ) -> Result<(), Error>

Runs the hinter over the points just written, if there are instructions and hinting is active.

points_start is where this glyph’s points begin in the outline, and phantom_offset is where its phantom points begin within them.

Source

fn load_composite( &mut self, glyph: &CompositeGlyph<'a>, gid: GlyphId, recurse_depth: usize, ) -> Result<(), Error>

Auto Trait Implementations§

§

impl<'a, 's, 'buf, 'hint, S> !RefUnwindSafe for Pass<'a, 's, 'buf, 'hint, S>

§

impl<'a, 's, 'buf, 'hint, S> !Send for Pass<'a, 's, 'buf, 'hint, S>

§

impl<'a, 's, 'buf, 'hint, S> !Sync for Pass<'a, 's, 'buf, 'hint, S>

§

impl<'a, 's, 'buf, 'hint, S> !UnwindSafe for Pass<'a, 's, 'buf, 'hint, S>

§

impl<'a, 's, 'buf, 'hint, S> Freeze for Pass<'a, 's, 'buf, 'hint, S>
where <S as Scale>::Coord: Freeze,

§

impl<'a, 's, 'buf, 'hint, S> Unpin for Pass<'a, 's, 'buf, 'hint, S>
where <S as Scale>::Coord: Unpin,

§

impl<'a, 's, 'buf, 'hint, S> UnsafeUnpin for Pass<'a, 's, 'buf, 'hint, S>
where <S as Scale>::Coord: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.