Enum printpdf::TextMatrix
source · pub enum TextMatrix {
Rotate(f32),
Translate(Pt, Pt),
TranslateRotate(Pt, Pt, f32),
Raw([f32; 6]),
}
Expand description
Text matrix. Text placement is a bit different, but uses the same concepts as a CTM that’s why it’s merged here
Note: TextScale
does not exist. Use layer.set_word_spacing()
and layer.set_character_spacing()
to specify the scaling between words
and characters.
Variants§
Rotate(f32)
Text rotation matrix, used for rotating text
Translate(Pt, Pt)
Text translate matrix, used for indenting (transforming) text (different to regular text placement)
TranslateRotate(Pt, Pt, f32)
Combined translate + rotate matrix
Raw([f32; 6])
Raw matrix (/tm operator)
Trait Implementations§
source§impl Clone for TextMatrix
impl Clone for TextMatrix
source§fn clone(&self) -> TextMatrix
fn clone(&self) -> TextMatrix
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TextMatrix
impl Debug for TextMatrix
source§impl From<TextMatrix> for [f32; 6]
impl From<TextMatrix> for [f32; 6]
source§fn from(val: TextMatrix) -> Self
fn from(val: TextMatrix) -> Self
Converts to this type from the input type.
source§impl From<TextMatrix> for Operation
impl From<TextMatrix> for Operation
source§fn from(val: TextMatrix) -> Self
fn from(val: TextMatrix) -> Self
Converts to this type from the input type.
impl Copy for TextMatrix
Auto Trait Implementations§
impl RefUnwindSafe for TextMatrix
impl Send for TextMatrix
impl Sync for TextMatrix
impl Unpin for TextMatrix
impl UnwindSafe for TextMatrix
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