pub struct Transform {
pub a: f64,
pub b: f64,
pub c: f64,
pub d: f64,
pub e: f64,
pub f: f64,
}
Expand description
Representation of the <transform>
type.
Fields§
§a: f64
§b: f64
§c: f64
§d: f64
§e: f64
§f: f64
Implementations§
source§impl Transform
impl Transform
sourcepub fn new_translate(x: f64, y: f64) -> Self
pub fn new_translate(x: f64, y: f64) -> Self
Constructs a new translate transform.
sourcepub fn new_rotate(angle: f64) -> Self
pub fn new_rotate(angle: f64) -> Self
Constructs a new rotate transform.
sourcepub fn rotate_at(&mut self, angle: f64, x: f64, y: f64)
pub fn rotate_at(&mut self, angle: f64, x: f64, y: f64)
Rotates the current transform at the specified position.
sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Returns true
if the transform is default, aka (1 0 0 1 0 0)
.
sourcepub fn get_translate(&self) -> (f64, f64)
pub fn get_translate(&self) -> (f64, f64)
Returns transform’s translate part.
Trait Implementations§
source§impl PartialEq<Transform> for Transform
impl PartialEq<Transform> for Transform
impl Copy for Transform
impl StructuralPartialEq for Transform
Auto Trait Implementations§
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin 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