pub struct Matrix(pub [f64; 16]);Expand description
A 4×4 matrix in CATransform3D layout (m[0..4] is the first row).
Tuple Fields§
§0: [f64; 16]Implementations§
Source§impl Matrix
impl Matrix
Sourcepub fn of(kind: TransformKind, v: f64) -> Matrix
pub fn of(kind: TransformKind, v: f64) -> Matrix
The matrix of one transform entry.
Sourcepub fn mul(&self, other: &Matrix) -> Matrix
pub fn mul(&self, other: &Matrix) -> Matrix
self · other: apply self, then other (row vectors).
Sourcepub fn is_2d(&self) -> bool
pub fn is_2d(&self) -> bool
True if the matrix is a 2D affine transform (no depth, no perspective).
Sourcepub fn decompose(&self) -> Option<Decomposed>
pub fn decompose(&self) -> Option<Decomposed>
Splits the matrix into the separate properties of an Android view.
Skew has no view property and is dropped. None for degenerate
matrices (a zero scale).
Trait Implementations§
impl Copy for Matrix
impl StructuralPartialEq for Matrix
Auto Trait Implementations§
impl Forget for Matrix
impl Freeze for Matrix
impl Move for Matrix
impl RefUnwindSafe for Matrix
impl Send for Matrix
impl Sync for Matrix
impl Unpin for Matrix
impl UnsafeUnpin for Matrix
impl UnwindSafe for Matrix
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