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: f64Implementations§
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.