pub struct TransformSink<'a, S> {
inner: &'a mut S,
matrix: Option<FontMatrix>,
scale: Option<Fixed>,
}Expand description
Command sink adapter that applies a matrix and optional scale.
Fields§
§inner: &'a mut S§matrix: Option<FontMatrix>§scale: Option<Fixed>Implementations§
Source§impl<'a, S> TransformSink<'a, S>
impl<'a, S> TransformSink<'a, S>
Sourcepub fn new(sink: &'a mut S, transform: Transform) -> Self
pub fn new(sink: &'a mut S, transform: Transform) -> Self
Creates a new sink for the given transform.
Sourcepub fn from_matrix_scale(
sink: &'a mut S,
matrix: FontMatrix,
scale: Option<Fixed>,
) -> Self
pub fn from_matrix_scale( sink: &'a mut S, matrix: FontMatrix, scale: Option<Fixed>, ) -> Self
Creates a new sink for the given matrix and optional scale.
fn transform(&self, x: Fixed, y: Fixed) -> (Fixed, Fixed)
Trait Implementations§
Source§impl<S: CommandSink> CommandSink for TransformSink<'_, S>
impl<S: CommandSink> CommandSink for TransformSink<'_, 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.
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 TransformSink<'a, S>
impl<'a, S> RefUnwindSafe for TransformSink<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for TransformSink<'a, S>where
S: Send,
impl<'a, S> Sync for TransformSink<'a, S>where
S: Sync,
impl<'a, S> Unpin for TransformSink<'a, S>
impl<'a, S> UnsafeUnpin for TransformSink<'a, S>
impl<'a, S> !UnwindSafe for TransformSink<'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