pub struct Transform {
pub a: f64,
pub b: f64,
pub c: f64,
pub d: f64,
pub e: f64,
pub f: f64,
}Expand description
A 2x3 affine transform using the PDF matrix coefficient order.
Points are transformed as x' = a*x + c*y + e and
y' = b*x + d*y + f.
Fields§
§a: f64§b: f64§c: f64§d: f64§e: f64§f: f64Implementations§
Source§impl Transform
impl Transform
Sourcepub fn rotate_about(degrees: f64, cx: f64, cy: f64) -> Transform
pub fn rotate_about(degrees: f64, cx: f64, cy: f64) -> Transform
Return a rotation in degrees about (cx, cy).
Sourcepub fn then(self, next: Transform) -> Transform
pub fn then(self, next: Transform) -> Transform
Compose two transforms, applying self first and next second.
Sourcepub fn is_identity(self) -> bool
pub fn is_identity(self) -> bool
Return whether all six coefficients exactly equal the identity.
Sourcepub fn transform_rect_bbox(self, rect: Rect) -> Rect
pub fn transform_rect_bbox(self, rect: Rect) -> Rect
Return the axis-aligned bounds of the four transformed corners.
Trait Implementations§
impl Copy for Transform
impl StructuralPartialEq for Transform
Auto Trait Implementations§
impl Freeze for Transform
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnsafeUnpin for Transform
impl UnwindSafe for Transform
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