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>
impl<'a, S: CommandSink> HintingSink<'a, S>
pub fn new(state: &'a HintState, sink: &'a mut S) -> Self
pub fn finish(&mut self)
fn maybe_close_subpath(&mut self)
fn flush_pending_line(&mut self)
fn hint(&mut self, coord: Fixed) -> Fixed
fn scale(&self, coord: Fixed) -> Fixed
fn add_stem(&mut self, min: Fixed, max: Fixed)
fn build_hint_map(&mut self, mask: Option<HintMask>, origin: Fixed)
Trait Implementations§
Source§impl<S: CommandSink> CommandSink for HintingSink<'_, S>
impl<S: CommandSink> CommandSink for HintingSink<'_, S>
Source§fn hint_mask(&mut self, mask: &[u8])
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])
fn counter_mask(&mut self, mask: &[u8])
Bitmask defining the counter hints that should be made active for the
commands that follow.
fn move_to(&mut self, x: Fixed, y: Fixed)
fn line_to(&mut self, x: Fixed, y: Fixed)
fn curve_to( &mut self, cx1: Fixed, cy1: Fixed, cx2: Fixed, cy2: Fixed, x: Fixed, y: Fixed, )
fn close(&mut self)
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> 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