Matrix


Module hilo/geom/Matrix Requires hilo/core/Class Source Matrix.js
Matrix class is a transforming matrix, which declare how points in one coordinate maped to another coordinate.

Methods

Method Defined
Matrix(a:Number, b:Number, c:Number, d:Number, tx:Number, ty:Number)
Constructor
Matrix
concat(mtx:Matrix):Matrix
Matrix
identity():Matrix
Matrix
invert():Matrix
Matrix
rotate(angle:Number):Matrix
Matrix
scale(sx:Number, sy:Number):Matrix
Matrix
transformPoint(point:Object, round:Boolean, returnNew:Boolean):Object
Matrix
translate(dx:Number, dy:Number):Matrix
Matrix

Constructor

Matrix(a:Number, b:Number, c:Number, d:Number, tx:Number, ty:Number)
parameters
a:Number — The value affects pixel positioning alongside the x axis when Scale or rotate images.
b:Number — The value affects pixel positioning alongside the y axis when rotate or skew images.
c:Number — The value affects pixel positioning alongside the x axis when rotate or skew images.
d:Number — The value affects pixel positioning alongside the y axis when Scale or rotate images.
tx:Number — The distance to move every point alongside the x axis.
ty:Number — The distance to move every point alongside the y axis.

Method Detail

concat(mtx:Matrix):Matrix
parameters
mtx:Matrix — Matrix that link to the source matrix.
return
Matrix — A Matrix Object.
identity():Matrix
return
Matrix — A Matrix object.
invert():Matrix
return
Matrix — A Matrix object.
rotate(angle:Number):Matrix
parameters
angle:Number — The angle to rotate.
return
Matrix — A Matrix object.
scale(sx:Number, sy:Number):Matrix
parameters
sx:Number — The value to multiply those object scale alongside the x axis.
sy:Number — The value to multiply those object scale alongside the y axis.
return
Matrix — A Matrix object.
transformPoint(point:Object, round:Boolean, returnNew:Boolean):Object
parameters
point:Object — Point need to transform.
round:Boolean — Whether ceil the coordinate values of the point.
returnNew:Boolean — Whether return a new point.
return
Object — 由应用矩阵转换所产生的点。
translate(dx:Number, dy:Number):Matrix
parameters
dx:Number — Translate Matrix alongside the x axis to the right (measured in px).
dy:Number — Translate Matrix alongside the y axis to the right (measured in px).
return
Matrix — A Matrix object.