Skip to content

Class: Matrix

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Matrix(a?, b?, c?, d?, e?, f?): Matrix

Parameters

NameType
a?number | IMatrixData
b?number
c?number
d?number
e?number
f?number

Returns

Matrix

Defined in

leafer/packages/math/src/Matrix.ts:17

Properties

a

a: number

Implementation of

IMatrix.a

Defined in

leafer/packages/math/src/Matrix.ts:7


b

b: number

Implementation of

IMatrix.b

Defined in

leafer/packages/math/src/Matrix.ts:8


c

c: number

Implementation of

IMatrix.c

Defined in

leafer/packages/math/src/Matrix.ts:9


d

d: number

Implementation of

IMatrix.d

Defined in

leafer/packages/math/src/Matrix.ts:10


e

e: number

Implementation of

IMatrix.e

Defined in

leafer/packages/math/src/Matrix.ts:11


f

f: number

Implementation of

IMatrix.f

Defined in

leafer/packages/math/src/Matrix.ts:12


scaleX

scaleX: number

Implementation of

IMatrix.scaleX

Defined in

leafer/packages/math/src/Matrix.ts:14


scaleY

scaleY: number

Implementation of

IMatrix.scaleY

Defined in

leafer/packages/math/src/Matrix.ts:15

Methods

set

set(a?, b?, c?, d?, e?, f?): IMatrix

Parameters

NameType
a?number | IMatrixData
b?number
c?number
d?number
e?number
f?number

Returns

IMatrix

Implementation of

IMatrix.set

Defined in

leafer/packages/math/src/Matrix.ts:21


setWith

setWith(dataWithScale): IMatrix

Parameters

NameType
dataWithScaleIMatrixWithScaleData

Returns

IMatrix

Implementation of

IMatrix.setWith

Defined in

leafer/packages/math/src/Matrix.ts:26


get

get(): IMatrixData

Returns

IMatrixData

Implementation of

IMatrix.get

Defined in

leafer/packages/math/src/Matrix.ts:33


clone

clone(): IMatrix

Returns

IMatrix

Implementation of

IMatrix.clone

Defined in

leafer/packages/math/src/Matrix.ts:38


translate

translate(x, y): IMatrix

Parameters

NameType
xnumber
ynumber

Returns

IMatrix

Implementation of

IMatrix.translate

Defined in

leafer/packages/math/src/Matrix.ts:43


translateInner

translateInner(x, y): IMatrix

Parameters

NameType
xnumber
ynumber

Returns

IMatrix

Implementation of

IMatrix.translateInner

Defined in

leafer/packages/math/src/Matrix.ts:48


scale

scale(x, y?): IMatrix

Parameters

NameType
xnumber
y?number

Returns

IMatrix

Implementation of

IMatrix.scale

Defined in

leafer/packages/math/src/Matrix.ts:53


scaleWith

scaleWith(x, y?): IMatrix

Parameters

NameType
xnumber
y?number

Returns

IMatrix

Implementation of

IMatrix.scaleWith

Defined in

leafer/packages/math/src/Matrix.ts:58


scaleOfOuter

scaleOfOuter(origin, x, y?): IMatrix

Parameters

NameType
originIPointData
xnumber
y?number

Returns

IMatrix

Implementation of

IMatrix.scaleOfOuter

Defined in

leafer/packages/math/src/Matrix.ts:65


scaleOfInner

scaleOfInner(origin, x, y?): IMatrix

Parameters

NameType
originIPointData
xnumber
y?number

Returns

IMatrix

Implementation of

IMatrix.scaleOfInner

Defined in

leafer/packages/math/src/Matrix.ts:69


rotate

rotate(angle): IMatrix

Parameters

NameType
anglenumber

Returns

IMatrix

Implementation of

IMatrix.rotate

Defined in

leafer/packages/math/src/Matrix.ts:74


rotateOfOuter

rotateOfOuter(origin, angle): IMatrix

Parameters

NameType
originIPointData
anglenumber

Returns

IMatrix

Implementation of

IMatrix.rotateOfOuter

Defined in

leafer/packages/math/src/Matrix.ts:79


rotateOfInner

rotateOfInner(origin, angle): IMatrix

Parameters

NameType
originIPointData
anglenumber

Returns

IMatrix

Implementation of

IMatrix.rotateOfInner

Defined in

leafer/packages/math/src/Matrix.ts:84


skew

skew(x, y?): IMatrix

Parameters

NameType
xnumber
y?number

Returns

IMatrix

Implementation of

IMatrix.skew

Defined in

leafer/packages/math/src/Matrix.ts:90


skewOfOuter

skewOfOuter(origin, x, y?): IMatrix

Parameters

NameType
originIPointData
xnumber
y?number

Returns

IMatrix

Implementation of

IMatrix.skewOfOuter

Defined in

leafer/packages/math/src/Matrix.ts:95


skewOfInner

skewOfInner(origin, x, y?): IMatrix

Parameters

NameType
originIPointData
xnumber
y?number

Returns

IMatrix

Implementation of

IMatrix.skewOfInner

Defined in

leafer/packages/math/src/Matrix.ts:100


multiply

multiply(child): IMatrix

Parameters

NameType
childIMatrixData

Returns

IMatrix

Implementation of

IMatrix.multiply

Defined in

leafer/packages/math/src/Matrix.ts:106


multiplyParent

multiplyParent(parent): IMatrix

Parameters

NameType
parentIMatrixData

Returns

IMatrix

Implementation of

IMatrix.multiplyParent

Defined in

leafer/packages/math/src/Matrix.ts:111


divide

divide(child): IMatrix

Parameters

NameType
childIMatrixData

Returns

IMatrix

Implementation of

IMatrix.divide

Defined in

leafer/packages/math/src/Matrix.ts:117


divideParent

divideParent(parent): IMatrix

Parameters

NameType
parentIMatrixData

Returns

IMatrix

Implementation of

IMatrix.divideParent

Defined in

leafer/packages/math/src/Matrix.ts:122


invert

invert(): IMatrix

Returns

IMatrix

Implementation of

IMatrix.invert

Defined in

leafer/packages/math/src/Matrix.ts:127


invertWith

invertWith(): IMatrix

Returns

IMatrix

Implementation of

IMatrix.invertWith

Defined in

leafer/packages/math/src/Matrix.ts:132


toOuterPoint

toOuterPoint(inner, to?, distance?): void

Parameters

NameType
innerIPointData
to?IPointData
distance?boolean

Returns

void

Implementation of

IMatrix.toOuterPoint

Defined in

leafer/packages/math/src/Matrix.ts:140


toInnerPoint

toInnerPoint(outer, to?, distance?): void

Parameters

NameType
outerIPointData
to?IPointData
distance?boolean

Returns

void

Implementation of

IMatrix.toInnerPoint

Defined in

leafer/packages/math/src/Matrix.ts:144


setLayout

setLayout(data, origin?, around?): IMatrix

Parameters

NameType
dataILayoutData
origin?IPointData
around?IPointData

Returns

IMatrix

Implementation of

IMatrix.setLayout

Defined in

leafer/packages/math/src/Matrix.ts:149


getLayout

getLayout(origin?, around?, firstSkewY?): ILayoutData

Parameters

NameType
origin?IPointData
around?IPointData
firstSkewY?boolean

Returns

ILayoutData

Implementation of

IMatrix.getLayout

Defined in

leafer/packages/math/src/Matrix.ts:154


withScale

withScale(scaleX?, scaleY?): IMatrixWithScaleData

Parameters

NameType
scaleX?number
scaleY?number

Returns

IMatrixWithScaleData

Implementation of

IMatrix.withScale

Defined in

leafer/packages/math/src/Matrix.ts:158


reset

reset(): void

Returns

void

Implementation of

IMatrix.reset

Defined in

leafer/packages/math/src/Matrix.ts:162

Released under the MIT License.