Table of contents
class Mat {}

Constructor

Constructs a new instance of the Mat class

Parameters
NameDescription

a

number

b

number

c

number

d

number

e

number

f

number

Properties

Scale

static Scale: {
  (x: number, y: number, cx: number, cy: number): MatModel
  (x: number, y: number): MatModel
}

a

a: number

b

b: number

c

c: number

d

d: number

e

e: number

f

f: number

Methods

Absolute()

static Absolute(m: MatLike): MatModel
Parameters
NameDescription

m

MatLike
Returns
MatModel

applyToBounds()

static applyToBounds(m: MatLike, box: Box): Box
Parameters
NameDescription

m

MatLike

box

Box
Returns
Box

applyToXY()

static applyToXY(m: MatLike, x: number, y: number): number[]
Parameters
NameDescription

m

MatLike

x

number

y

number
Returns
number[]

Cast()

static Cast(m: MatLike): Mat
Parameters
NameDescription

m

MatLike
Returns
Mat

Compose()

static Compose(...matrices: MatLike[]): Mat
Parameters
NameDescription

matrices

MatLike[]
Returns
Mat

Decompose()

static Decompose(m: MatLike): {
  rotation: number
  scaleX: number
  scaleY: number
  x: number
  y: number
}
Parameters
NameDescription

m

MatLike
Returns
{
  rotation: number
  scaleX: number
  scaleY: number
  x: number
  y: number
}

From()

static From(m: MatLike): Mat
Parameters
NameDescription

m

MatLike
Returns
Mat

Identity()

static Identity(): Mat

Inverse()

static Inverse(m: MatModel): MatModel
Parameters
NameDescription

m

MatModel
Returns
MatModel

Multiply()

static Multiply(m1: MatModel, m2: MatModel): MatModel
Parameters
NameDescription

m1

MatModel

m2

MatModel
Returns
MatModel

Point()

static Point(m: MatLike): Vec
Parameters
NameDescription

m

MatLike
Returns
Vec

Rotate()

static Rotate(r: number, cx?: number, cy?: number): Mat
Parameters
NameDescription

r

number

cx

number

cy

number
Returns
Mat

Rotation()

static Rotation(m: MatLike): number
Parameters
NameDescription

m

MatLike
Returns
number

Smooth()

static Smooth(m: MatLike, precision?: number): MatLike
Parameters
NameDescription

m

MatLike

precision

number
Returns
MatLike

Translate()

static Translate(x: number, y: number): Mat
Parameters
NameDescription

x

number

y

number
Returns
Mat

applyToPoint()

applyToPoint(point: VecLike): Vec
Parameters
NameDescription

point

VecLike
Returns
Vec

applyToPoints()

applyToPoints(points: VecLike[]): Vec[]
Parameters
NameDescription

points

VecLike[]
Returns
Vec[]

clone()

clone(): Mat

decompose()

decompose(): {
  rotation: number
  scaleX: number
  scaleY: number
  x: number
  y: number
}

decomposed()

decomposed(): {
  rotation: number
  scaleX: number
  scaleY: number
  x: number
  y: number
}

equals()

equals(m: Mat | MatModel): boolean
Parameters
NameDescription

m

Mat | MatModel
Returns
boolean

identity()

identity(): this

invert()

invert(): this

multiply()

multiply(m: Mat | MatModel): this
Parameters
NameDescription

m

Mat | MatModel
Returns
this

point()

point(): Vec

rotate()

rotate(r: number, cx?: number, cy?: number): Mat
Parameters
NameDescription

r

number

cx

number

cy

number
Returns
Mat

rotation()

rotation(): number

scale()

scale(x: number, y: number): this
Parameters
NameDescription

x

number

y

number
Returns
this

setTo()

setTo(model: MatModel): this
Parameters
NameDescription

model

MatModel
Returns
this

toCssString()

toCssString(): string

translate()

translate(x: number, y: number): Mat
Parameters
NameDescription

x

number

y

number
Returns
Mat

HistoryManagerPoint2d