Mat
Table of contents
- Properties
- Methods
- Absolute
- applyToBounds
- applyToPoint
- applyToPoint
- applyToPoints
- applyToPoints
- applyToXY
- Cast
- clone
- Compose
- decompose
- Decompose
- decomposed
- equals
- From
- identity
- Identity
- Inverse
- invert
- multiply
- Multiply
- point
- Point
- rotate
- Rotate
- rotation
- Rotation
- scale
- setTo
- Smooth
- toCssString
- toCssString
- translate
- Translate
Public class
class Mat {}
packages/editor/src/lib/primitives/Mat.ts
Constructor
Public constructor
Constructs a new instance of the Mat
class
Name | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Properties
a
Public property
a: number
b
Public property
b: number
c
Public property
c: number
d
Public property
d: number
e
Public property
e: number
f
Public property
f: number
Scale
Public static property
static Scale: {
(x: number, y: number, cx: number, cy: number): MatModel
(x: number, y: number): MatModel
}
Methods
Absolute()
Public static method
static Absolute(m: MatLike): MatModel
Name | Description |
---|---|
|
|
MatModel
applyToBounds()
Public static method
static applyToBounds(m: MatLike, box: Box): Box
Name | Description |
---|---|
|
|
|
|
Box
applyToPoint()
Public method
applyToPoint(point: VecLike): Vec
Name | Description |
---|---|
|
|
Vec
applyToPoint()
Public static method
static applyToPoint(m: MatLike, point: VecLike): Vec
Name | Description |
---|---|
|
|
|
|
Vec
applyToPoints()
Public method
applyToPoints(points: VecLike[]): Vec[]
Name | Description |
---|---|
|
|
Vec[]
applyToPoints()
Public static method
static applyToPoints(m: MatLike, points: VecLike[]): Vec[]
Name | Description |
---|---|
|
|
|
|
Vec[]
applyToXY()
Public static method
static applyToXY(m: MatLike, x: number, y: number): number[]
Name | Description |
---|---|
|
|
|
|
|
|
number[]
Cast()
Public static method
static Cast(m: MatLike): Mat
Name | Description |
---|---|
|
|
Mat
clone()
Public method
clone(): Mat
Compose()
Public static method
static Compose(...matrices: MatLike[]): Mat
Name | Description |
---|---|
|
|
Mat
decompose()
Public method
decompose(): {
rotation: number
scaleX: number
scaleY: number
x: number
y: number
}
Decompose()
Public static method
static Decompose(m: MatLike): {
rotation: number
scaleX: number
scaleY: number
x: number
y: number
}
Name | Description |
---|---|
|
|
{
rotation: number
scaleX: number
scaleY: number
x: number
y: number
}
decomposed()
Public method
decomposed(): {
rotation: number
scaleX: number
scaleY: number
x: number
y: number
}
equals()
Public method
equals(m: Mat | MatModel): boolean
Name | Description |
---|---|
|
|
boolean
From()
Public static method
static From(m: MatLike): Mat
Name | Description |
---|---|
|
|
Mat
identity()
Public method
identity(): this
Identity()
Public static method
static Identity(): Mat
Inverse()
Public static method
static Inverse(m: MatModel): MatModel
Name | Description |
---|---|
|
|
MatModel
invert()
Public method
invert(): this
multiply()
Public method
multiply(m: Mat | MatModel): this
Name | Description |
---|---|
|
|
this
Multiply()
Public static method
static Multiply(m1: MatModel, m2: MatModel): MatModel
Name | Description |
---|---|
|
|
|
|
MatModel
point()
Public method
point(): Vec
Point()
Public static method
static Point(m: MatLike): Vec
Name | Description |
---|---|
|
|
Vec
rotate()
Public method
rotate(r: number, cx?: number, cy?: number): Mat
Name | Description |
---|---|
|
|
|
|
|
|
Mat
Rotate()
Public static method
static Rotate(r: number, cx?: number, cy?: number): Mat
Name | Description |
---|---|
|
|
|
|
|
|
Mat
rotation()
Public method
rotation(): number
Rotation()
Public static method
static Rotation(m: MatLike): number
Name | Description |
---|---|
|
|
number
scale()
Public method
scale(x: number, y: number): this
Name | Description |
---|---|
|
|
|
|
this
setTo()
Public method
setTo(model: MatModel): this
Name | Description |
---|---|
|
|
this
Smooth()
Public static method
static Smooth(m: MatLike, precision?: number): MatLike
Name | Description |
---|---|
|
|
|
|
MatLike
toCssString()
Public method
toCssString(): string
toCssString()
Public static method
static toCssString(m: MatLike): string
Name | Description |
---|---|
|
|
string
translate()
Public method
translate(x: number, y: number): Mat
Name | Description |
---|---|
|
|
|
|
Mat
Translate()
Public static method
static Translate(x: number, y: number): Mat
Name | Description |
---|---|
|
|
|
|
Mat