Struct ttf_parser::Transform
source · pub struct Transform {
pub a: f32,
pub b: f32,
pub c: f32,
pub d: f32,
pub e: f32,
pub f: f32,
}
Expand description
An affine transform.
Fields§
§a: f32
The ‘a’ component of the transform.
b: f32
The ‘b’ component of the transform.
c: f32
The ‘c’ component of the transform.
d: f32
The ‘d’ component of the transform.
e: f32
The ‘e’ component of the transform.
f: f32
The ‘f’ component of the transform.
Implementations§
source§impl Transform
impl Transform
sourcepub fn new(a: f32, b: f32, c: f32, d: f32, e: f32, f: f32) -> Self
pub fn new(a: f32, b: f32, c: f32, d: f32, e: f32, f: f32) -> Self
Creates a new transform with the specified components.
sourcepub fn new_translate(tx: f32, ty: f32) -> Self
pub fn new_translate(tx: f32, ty: f32) -> Self
Creates a new translation transform.
sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Checks whether a transform is the identity transform.
Trait Implementations§
source§impl PartialEq for Transform
impl PartialEq for Transform
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 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