Struct HintingSink

Source
pub(super) struct HintingSink<'a, S> {
    state: &'a HintState,
    sink: &'a mut S,
    stem_hints: [StemHint; 96],
    stem_count: u8,
    mask: HintMask,
    initial_map: HintMap,
    map: HintMap,
    start_point: Option<[Fixed; 2]>,
    pending_line: Option<[Fixed; 4]>,
}

Fields§

§state: &'a HintState§sink: &'a mut S§stem_hints: [StemHint; 96]§stem_count: u8§mask: HintMask§initial_map: HintMap§map: HintMap§start_point: Option<[Fixed; 2]>

Most recent move_to in character space.

§pending_line: Option<[Fixed; 4]>

Most recent line_to. First two elements are coords in character space and the last two are in device space.

Implementations§

Source§

impl<'a, S: CommandSink> HintingSink<'a, S>

Source

pub fn new(state: &'a HintState, sink: &'a mut S) -> Self

Source

pub fn finish(&mut self)

Source

fn maybe_close_subpath(&mut self)

Source

fn flush_pending_line(&mut self)

Source

fn hint(&mut self, coord: Fixed) -> Fixed

Source

fn scale(&self, coord: Fixed) -> Fixed

Source

fn add_stem(&mut self, min: Fixed, max: Fixed)

Source

fn build_hint_map(&mut self, mask: Option<HintMask>, origin: Fixed)

Trait Implementations§

Source§

impl<S: CommandSink> CommandSink for HintingSink<'_, S>

Source§

fn hstem(&mut self, min: Fixed, max: Fixed)

Horizontal stem hint at y with height dy.
Source§

fn hint_mask(&mut self, mask: &[u8])

Bitmask defining the hints that should be made active for the commands that follow.
Source§

fn counter_mask(&mut self, mask: &[u8])

Bitmask defining the counter hints that should be made active for the commands that follow.
Source§

fn move_to(&mut self, x: Fixed, y: Fixed)

Source§

fn line_to(&mut self, x: Fixed, y: Fixed)

Source§

fn curve_to( &mut self, cx1: Fixed, cy1: Fixed, cx2: Fixed, cy2: Fixed, x: Fixed, y: Fixed, )

Source§

fn close(&mut self)

Source§

fn vstem(&mut self, x: Fixed, dx: Fixed)

Vertical stem hint at x with width dx.

Auto Trait Implementations§

§

impl<'a, S> Freeze for HintingSink<'a, S>

§

impl<'a, S> RefUnwindSafe for HintingSink<'a, S>
where S: RefUnwindSafe,

§

impl<'a, S> Send for HintingSink<'a, S>
where S: Send,

§

impl<'a, S> Sync for HintingSink<'a, S>
where S: Sync,

§

impl<'a, S> Unpin for HintingSink<'a, S>

§

impl<'a, S> !UnwindSafe for HintingSink<'a, S>

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> 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.