struct NopFilteringSink<'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 S
Implementations§
Source§impl<'a, S> NopFilteringSink<'a, S>where
S: CommandSink,
impl<'a, S> NopFilteringSink<'a, S>where
S: CommandSink,
Trait Implementations§
Source§impl<S> CommandSink for NopFilteringSink<'_, S>where
S: CommandSink,
impl<S> CommandSink for NopFilteringSink<'_, 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.
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 NopFilteringSink<'a, S>
impl<'a, S> RefUnwindSafe for NopFilteringSink<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for NopFilteringSink<'a, S>where
S: Send,
impl<'a, S> Sync for NopFilteringSink<'a, S>where
S: Sync,
impl<'a, S> Unpin for NopFilteringSink<'a, S>
impl<'a, S> !UnwindSafe for NopFilteringSink<'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