pub struct Transform(pub [f32; 6]);Tuple Fields§
§0: [f32; 6]Implementations§
Source§impl Transform
impl Transform
pub fn identity() -> Transform
pub fn translate(tx: f32, ty: f32) -> Transform
pub fn scale(sx: f32, sy: f32) -> Transform
pub fn rotate(a: f32) -> Transform
pub fn skew_x(a: f32) -> Transform
pub fn skew_y(a: f32) -> Transform
pub fn pre_multiply(self, rhs: Self) -> Self
pub fn inverse(self) -> Transform
pub fn transform_point(&self, pt: Point) -> Point
Trait Implementations§
Source§impl<T: AsPrimitive<f32>> From<(T, T, T, T, T, T)> for Transform
impl<T: AsPrimitive<f32>> From<(T, T, T, T, T, T)> for Transform
Source§fn from((a1, a2, a3, a4, a5, a6): (T, T, T, T, T, T)) -> Self
fn from((a1, a2, a3, a4, a5, a6): (T, T, T, T, T, T)) -> Self
Converts to this type from the input type.
Source§impl MulAssign for Transform
impl MulAssign for Transform
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreimpl Copy 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 UnsafeUnpin 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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more