Struct owned_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) -> Transform
pub fn new(a: f32, b: f32, c: f32, d: f32, e: f32, f: f32) -> Transform
Creates a new transform with the specified components.
sourcepub fn new_translate(tx: f32, ty: f32) -> Transform
pub fn new_translate(tx: f32, ty: f32) -> Transform
Creates a new translation transform.
sourcepub fn new_rotate(angle: f32) -> Transform
pub fn new_rotate(angle: f32) -> Transform
Creates a new rotation transform.
sourcepub fn combine(ts1: Transform, ts2: Transform) -> Transform
pub fn combine(ts1: Transform, ts2: Transform) -> Transform
Combines two transforms with each other.
sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Checks whether a transform is the identity transform.
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 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)