pub struct NopFilterSink<'a, S> {
is_open: bool,
start: Option<(Fixed, Fixed)>,
pending_element: Option<PendingElement>,
inner: &'a mut S,
}Expand description
Command sink adapter that suppresses degenerate move and line commands.
FreeType avoids emitting empty contours and zero length lines to prevent artifacts when stem darkening is enabled. We don’t support stem darkening because it’s not enabled by any of our clients but we remove the degenerate elements regardless to match the output.
Fields§
§is_open: bool§start: Option<(Fixed, Fixed)>§pending_element: Option<PendingElement>§inner: &'a mut SImplementations§
Source§impl<'a, S> NopFilterSink<'a, S>where
S: CommandSink,
impl<'a, S> NopFilterSink<'a, S>where
S: CommandSink,
Trait Implementations§
Source§impl<S> CommandSink for NopFilterSink<'_, S>where
S: CommandSink,
impl<S> CommandSink for NopFilterSink<'_, S>where
S: CommandSink,
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.
Source§fn clear_hints(&mut self)
fn clear_hints(&mut self)
Clear accumulated stem hints and all data derived from them.
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 NopFilterSink<'a, S>
impl<'a, S> RefUnwindSafe for NopFilterSink<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for NopFilterSink<'a, S>where
S: Send,
impl<'a, S> Sync for NopFilterSink<'a, S>where
S: Sync,
impl<'a, S> Unpin for NopFilterSink<'a, S>
impl<'a, S> UnsafeUnpin for NopFilterSink<'a, S>
impl<'a, S> !UnwindSafe for NopFilterSink<'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