pub struct Matrix {
pub a: Fixed16,
pub b: Fixed16,
pub c: Fixed16,
pub d: Fixed16,
pub tx: Twips,
pub ty: Twips,
}Expand description
The transformation matrix used by Flash display objects.
The matrix is a 2x3 affine transformation matrix. A point (x, y) is transformed by the matrix in the following way:
[a c tx] * [x] = [a*x + c*y + tx]
[b d ty] [y] [b*x + d*y + ty]
[0 0 1 ] [1] [1 ]The SWF format uses 16.16 format for a, b, c, d. Twips are used for tx and ty.
This means that objects in Flash can only move in units of twips, or 1/20 pixels.
Fields§
§a: Fixed16The matrix element at [0, 0]. Labeled ScaleX in SWF19.
b: Fixed16The matrix element at [1, 0]. Labeled RotateSkew0 in SWF19.
c: Fixed16The matrix element at [0, 1]. Labeled RotateSkew1 in SWF19.
d: Fixed16The matrix element at [1, 1]. Labeled ScaleY in SWF19.
tx: TwipsThe X translation in twips. Labeled TranslateX in SWF19.
ty: TwipsThe Y translation in twips. Labeled TranslateX in SWF19.
Implementations§
Trait Implementations§
Source§impl MulAssign for Matrix
impl MulAssign for Matrix
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreimpl Copy for Matrix
impl Eq for Matrix
impl StructuralPartialEq for Matrix
Auto Trait Implementations§
impl Freeze for Matrix
impl RefUnwindSafe for Matrix
impl Send for Matrix
impl Sync for Matrix
impl Unpin 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