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.
Trait Implementations§
source§impl PartialEq for Transform
impl PartialEq for Transform
source§impl ToTokens for Transform
impl ToTokens for Transform
source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
impl Copy for Transform
impl Eq 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 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
source§impl<T> IsDefault for T
impl<T> IsDefault for T
source§fn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.