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

a

a: number

b

b: number

c

c: number

d

d: number

e

e: number

f

f: number

Methods

Absolute()

static
static Absolute(m: MatLike): MatModel

Parameters

NameDescription

m

Returns


applyToBounds()

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

Parameters

NameDescription

m

box

Returns


applyToXY()

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

Parameters

NameDescription

m

x

number

y

number

Returns

number[]

Cast()

static
static Cast(m: MatLike): Mat

Parameters

NameDescription

m

Returns


Compose()

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

Parameters

NameDescription

matrices

Returns


Decompose()

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

Parameters

NameDescription

m

Returns

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

From()

static
static From(m: MatLike): Mat

Parameters

NameDescription

m

Returns


Identity()

static
static Identity(): Mat

Inverse()

static
static Inverse(m: MatModel): MatModel

Parameters

NameDescription

m

Returns


Multiply()

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

Parameters

NameDescription

m1

m2

Returns


Point()

static
static Point(m: MatLike): Vec

Parameters

NameDescription

m

Returns


Rotate()

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

Parameters

NameDescription

r

number

cx

number

cy

number

Returns


Rotation()

static
static Rotation(m: MatLike): number

Parameters

NameDescription

m

Returns

number

Scale()

static
static Scale(x: number, y: number): MatModel

Parameters

NameDescription

x

number

y

number

Returns


Smooth()

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

Parameters

NameDescription

m

precision

number

Returns


Translate()

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

Parameters

NameDescription

x

number

y

number

Returns


applyToPoint()

applyToPoint(point: VecLike): Vec

Parameters

NameDescription

point

Returns


applyToPoints()

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

Parameters

NameDescription

points

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

Returns

boolean

identity()

identity(): this

invert()

invert(): this

multiply()

multiply(m: Mat | MatModel): this

Parameters

NameDescription

m

Returns

this

point()

point(): Vec

rotate()

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

Parameters

NameDescription

r

number

cx

number

cy

number

Returns


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

Returns

this

toCssString()

toCssString(): string

translate()

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

Parameters

NameDescription

x

number

y

number

Returns


Prev
HistoryManager
Next
Point2d