import { ASObject } from '@awayfl/avm2'; import { DataBuffer } from '@awayjs/graphics'; import { Point } from './Point'; import { Vector3D } from './Vector3D'; import { Matrix as AwayMatrix } from '@awayjs/core'; export declare class Matrix extends ASObject { private _adaptee; static axClass: typeof Matrix; static classInitializer(): void; static classSymbols: string[]; static instanceSymbols: string[]; get adaptee(): AwayMatrix; /** * The value that affects the positioning of pixels along the x axis * when scaling or rotating an image. */ get a(): number; set a(value: number); /** * The value that affects the positioning of pixels along the y axis * when rotating or skewing an image. */ get b(): number; set b(value: number); /** * The value that affects the positioning of pixels along the x axis * when rotating or skewing an image. */ get c(): number; set c(value: number); /** * The value that affects the positioning of pixels along the y axis * when scaling or rotating an image. */ get d(): number; set d(value: number); /** * The distance by which to translate each point along the x axis. */ get tx(): number; set tx(value: number); /** * The distance by which to translate each point along the y axis. */ get ty(): number; set ty(value: number); /** * Creates a new Matrix object with the specified parameters. In matrix * notation, the properties are organized like this: * *
If you do not provide any parameters to the new Matrix()
* constructor, it creates an identity matrix with the following
* values:
In matrix notation, the identity matrix looks like this:
* * @param a The value that affects the positioning of pixels along the * x axis when scaling or rotating an image. * @param b The value that affects the positioning of pixels along the * y axis when rotating or skewing an image. * @param c The value that affects the positioning of pixels along the * x axis when rotating or skewing an image. * @param d The value that affects the positioning of pixels along the * y axis when scaling or rotating an image.. * @param tx The distance by which to translate each point along the x * axis. * @param ty The distance by which to translate each point along the y * axis. */ constructor(aAdaptee?: number | AwayMatrix, b?: number, c?: number, d?: number, tx?: number, ty?: number); static FromUntyped(object: any): Matrix; static FromDataBuffer(input: DataBuffer): Matrix; static FROZEN_IDENTITY_MATRIX: Matrix; static TEMP_MATRIX: Matrix; /** * Concatenates a matrix with the current matrix, effectively combining the * geometric effects of the two. In mathematical terms, concatenating two * matrixes is the same as combining them using matrix multiplication. * *For example, if matrix m1 scales an object by a factor of
* four, and matrix m2 rotates an object by 1.5707963267949
* radians(Math.PI/2), then m1.concat(m2)
* transforms m1 into a matrix that scales an object by a factor
* of four and rotates the object by Math.PI/2 radians.
This method replaces the source matrix with the concatenated matrix. If
* you want to concatenate two matrixes without altering either of the two
* source matrixes, first copy the source matrix by using the
* clone() method, as shown in the Class Examples section.
After calling the identity() method, the resulting matrix
* has the following properties: a=1, b=0,
* c=0, d=1, tx=0,
* ty=0.
In matrix notation, the identity matrix looks like this:
* */ identity(): void; /** * Includes parameters for scaling, rotation, and translation. When applied * to a matrix it sets the matrix's values based on those parameters. * *Using the createBox() method lets you obtain the same
* matrix as you would if you applied the identity(),
* rotate(), scale(), and translate()
* methods in succession. For example, mat1.createBox(2,2,Math.PI/4,
* 100, 100) has the same effect as the following:
beginGradientFill() and lineGradientStyle()
* methods of the Graphics class. Width and height are scaled to a
* scaleX/scaleY pair and the
* tx/ty values are offset by half the width and
* height.
*
* For example, consider a gradient with the following * characteristics:
* *GradientType.LINEAR[0,
* 255]SpreadMethod.PADInterpolationMethod.LINEAR_RGBThe following illustrations show gradients in which the matrix was
* defined using the createGradientBox() method with different
* parameter settings:
width parameter.
* @param ty The distance, in pixels, to translate down along the
* y axis. This value is offset by half of the
* height parameter.
*/
createGradientBox(width: number, height: number, rotation?: number, tx?: number, ty?: number): void;
/**
* Applies a rotation transformation to the Matrix object.
*
* The rotate() method alters the a,
* b, c, and d properties of the
* Matrix object. In matrix notation, this is the same as concatenating the
* current matrix with the following:
dx and dy parameters.
*
* @param dx The amount of movement along the x axis to the right, in
* pixels.
* @param dy The amount of movement down along the y axis, in pixels.
*/
translate(dx: number, dy: number): void;
/**
* Applies a scaling transformation to the matrix. The x axis is
* multiplied by sx, and the y axis it is multiplied by
* sy.
*
* The scale() method alters the a and
* d properties of the Matrix object. In matrix notation, this
* is the same as concatenating the current matrix with the following
* matrix:
transformPoint()
* method, the deltaTransformPoint() method's transformation
* does not consider the translation parameters tx and
* ty.
*
* @param point The point for which you want to get the result of the matrix
* transformation.
* @return The point resulting from applying the matrix transformation.
*/
deltaTransformPoint(point: Point): Point;
/**
* Returns the result of applying the geometric transformation represented by
* the Matrix object to the specified point.
*
* @param point The point for which you want to get the result of the Matrix
* transformation.
* @return The point resulting from applying the Matrix transformation.
*/
transformPoint(point: Point): Point;
/**
* Copies all of the matrix data from the source Point object into the
* calling Matrix object.
*
* @param sourceMatrix The Matrix object from which to copy the data.
*/
copyFrom(sourceMatrix: Matrix): void;
/**
* Sets the members of Matrix to the specified values.
*
* @param a The value that affects the positioning of pixels along the
* x axis when scaling or rotating an image.
* @param b The value that affects the positioning of pixels along the
* y axis when rotating or skewing an image.
* @param c The value that affects the positioning of pixels along the
* x axis when rotating or skewing an image.
* @param d The value that affects the positioning of pixels along the
* y axis when scaling or rotating an image..
* @param tx The distance by which to translate each point along the x
* axis.
* @param ty The distance by which to translate each point along the y
* axis.
*/
setTo(a: number, b: number, c: number, d: number, tx: number, ty: number): void;
/**
* Copies specific row of the calling Matrix object into the Vector3D object.
* The w element of the Vector3D object will not be changed.
*
* @param row The row from which to copy the data from.
* @param vector3D The Vector3D object from which to copy the data.
*/
copyRowTo(row: number, vector3D: Vector3D): void;
/**
* Copies specific column of the calling Matrix object into the Vector3D
* object. The w element of the Vector3D object will not be changed.
*
* @param column The column from which to copy the data from.
* @param vector3D The Vector3D object from which to copy the data.
*/
copyColumnTo(column: number, vector3D: Vector3D): void;
/**
* Copies a Vector3D object into specific row of the calling Matrix object.
*
* @param row The row from which to copy the data from.
* @param vector3D The Vector3D object from which to copy the data.
*/
copyRowFrom(row: number, vector3D: Vector3D): void;
/**
* Copies a Vector3D object into specific column of the calling Matrix3D
* object.
*
* @param column The column from which to copy the data from.
* @param vector3D The Vector3D object from which to copy the data.
*/
copyColumnFrom(column: number, vector3D: Vector3D): void;
/**
* Returns a new Matrix object that is a clone of this matrix, with an exact
* copy of the contained object.
*
* @return A Matrix object.
*/
clone(): Matrix;
toString(): string;
writeExternal(output: DataBuffer): void;
}
//# sourceMappingURL=Matrix.d.ts.map