Enum printpdf::ctm::CurTransMat
source · pub enum CurTransMat {
Translate(Pt, Pt),
Rotate(f32),
TranslateRotate(Pt, Pt, f32),
Scale(f32, f32),
Raw([f32; 6]),
Identity,
}
Expand description
PDF “current transformation matrix”. Once set, will operate on all following shapes,
until the layer.restore_graphics_state()
is called. It is important to
call layer.save_graphics_state()
earlier.
Variants§
Translate(Pt, Pt)
Translation matrix (in points from bottom left corner) X and Y can have different values
Rotate(f32)
Rotation matrix (clockwise, in degrees)
TranslateRotate(Pt, Pt, f32)
Combined rotate + translate matrix
Scale(f32, f32)
Scale matrix (1.0 = 100% scale, no change) X and Y can have different values
Raw([f32; 6])
Raw (PDF-internal) PDF matrix
Identity
Identity matrix
Implementations§
Trait Implementations§
source§impl Clone for CurTransMat
impl Clone for CurTransMat
source§fn clone(&self) -> CurTransMat
fn clone(&self) -> CurTransMat
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 CurTransMat
impl Debug for CurTransMat
source§impl From<CurTransMat> for [f32; 6]
impl From<CurTransMat> for [f32; 6]
source§fn from(val: CurTransMat) -> Self
fn from(val: CurTransMat) -> Self
Converts to this type from the input type.
source§impl From<CurTransMat> for Object
impl From<CurTransMat> for Object
source§fn from(val: CurTransMat) -> Self
fn from(val: CurTransMat) -> Self
Converts to this type from the input type.
source§impl From<CurTransMat> for Operation
impl From<CurTransMat> for Operation
source§fn from(val: CurTransMat) -> Self
fn from(val: CurTransMat) -> Self
Converts to this type from the input type.
impl Copy for CurTransMat
Auto Trait Implementations§
impl RefUnwindSafe for CurTransMat
impl Send for CurTransMat
impl Sync for CurTransMat
impl Unpin for CurTransMat
impl UnwindSafe for CurTransMat
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