Table of contents

Public class

Signature
class Mat {}
Source

packages/editor/src/lib/primitives/Mat.ts


Constructor

Public 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

Public property

Signature
a: number

b

Public property

Signature
b: number

c

Public property

Signature
c: number

d

Public property

Signature
d: number

e

Public property

Signature
e: number

f

Public property

Signature
f: number

Scale

Public static property

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

MatModel


Methods

Absolute()

Public static method

Signature
static Absolute(m: MatLike): MatModel
Parameters
NameDescription

m

MatLike
Returns
MatModel
References

MatLike, MatModel


applyToBounds()

Public static method

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

m

MatLike

box

Box
Returns
Box
References

MatLike, Box


applyToPoint()

Public method

Signature
applyToPoint(point: VecLike): Vec
Parameters
NameDescription

point

VecLike
Returns
Vec
References

VecLike, Vec


applyToPoint()

Public static method

Signature
static applyToPoint(m: MatLike, point: VecLike): Vec
Parameters
NameDescription

m

MatLike

point

VecLike
Returns
Vec
References

MatLike, VecLike, Vec


applyToPoints()

Public method

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

points

VecLike[]
Returns
Vec[]
References

VecLike, Vec


applyToPoints()

Public static method

Signature
static applyToPoints(m: MatLike, points: VecLike[]): Vec[]
Parameters
NameDescription

m

MatLike

points

VecLike[]
Returns
Vec[]
References

MatLike, VecLike, Vec


applyToXY()

Public static method

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

m

MatLike

x

number

y

number
Returns
number[]
References

MatLike


Cast()

Public static method

Signature
static Cast(m: MatLike): Mat
Parameters
NameDescription

m

MatLike
Returns
Mat
References

MatLike, Mat


clone()

Public method

Signature
clone(): Mat
References

Mat


Compose()

Public static method

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

matrices

MatLike[]
Returns
Mat
References

MatLike, Mat


decompose()

Public method

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

Decompose()

Public static method

Signature
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
}
References

MatLike


decomposed()

Public method

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

equals()

Public method

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

m

Mat | MatModel
Returns
boolean
References

Mat, MatModel


From()

Public static method

Signature
static From(m: MatLike): Mat
Parameters
NameDescription

m

MatLike
Returns
Mat
References

MatLike, Mat


identity()

Public method

Signature
identity(): this

Identity()

Public static method

Signature
static Identity(): Mat
References

Mat


Inverse()

Public static method

Signature
static Inverse(m: MatModel): MatModel
Parameters
NameDescription

m

MatModel
Returns
MatModel
References

MatModel


invert()

Public method

Signature
invert(): this

multiply()

Public method

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

m

Mat | MatModel
Returns
this
References

Mat, MatModel


Multiply()

Public static method

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

m1

MatModel

m2

MatModel
Returns
MatModel
References

MatModel


point()

Public method

Signature
point(): Vec
References

Vec


Point()

Public static method

Signature
static Point(m: MatLike): Vec
Parameters
NameDescription

m

MatLike
Returns
Vec
References

MatLike, Vec


rotate()

Public method

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

r

number

cx

number

cy

number
Returns
Mat
References

Mat


Rotate()

Public static method

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

r

number

cx

number

cy

number
Returns
Mat
References

Mat


rotation()

Public method

Signature
rotation(): number

Rotation()

Public static method

Signature
static Rotation(m: MatLike): number
Parameters
NameDescription

m

MatLike
Returns
number
References

MatLike


scale()

Public method

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

x

number

y

number
Returns
this

setTo()

Public method

Signature
setTo(model: MatModel): this
Parameters
NameDescription

model

MatModel
Returns
this
References

MatModel


Smooth()

Public static method

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

m

MatLike

precision

number
Returns
MatLike
References

MatLike


toCssString()

Public method

Signature
toCssString(): string

toCssString()

Public static method

Signature
static toCssString(m: MatLike): string
Parameters
NameDescription

m

MatLike
Returns
string
References

MatLike


translate()

Public method

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

x

number

y

number
Returns
Mat
References

Mat


Translate()

Public static method

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

x

number

y

number
Returns
Mat
References

Mat


loopToHtmlElementMatLike