Matrix2d
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 Matrix2d {}
packages/editor/src/lib/primitives/Matrix2d.ts
Constructor
Public constructor
Constructs a new instance of the Matrix2d
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): Matrix2dModel
(x: number, y: number, cx: number, cy: number): Matrix2dModel
}
Methods
Absolute()
Public static method
static Absolute(m: MatLike): Matrix2dModel
Name | Description |
---|---|
|
|
Matrix2dModel
applyToBounds()
Public static method
static applyToBounds(m: MatLike, box: Box2d): Box2d
Name | Description |
---|---|
|
|
|
|
Box2d
applyToPoint()
Public method
applyToPoint(point: VecLike): Vec2d
Name | Description |
---|---|
|
|
Vec2d
applyToPoint()
Public static method
static applyToPoint(m: MatLike, point: VecLike): Vec2d
Name | Description |
---|---|
|
|
|
|
Vec2d
applyToPoints()
Public method
applyToPoints(points: VecLike[]): Vec2d[]
Name | Description |
---|---|
|
|
Vec2d[]
applyToPoints()
Public static method
static applyToPoints(m: MatLike, points: VecLike[]): Vec2d[]
Name | Description |
---|---|
|
|
|
|
Vec2d[]
applyToXY()
Public static method
static applyToXY(m: MatLike, x: number, y: number): number[]
Name | Description |
---|---|
|
|
|
|
|
|
number[]
Cast()
Public static method
static Cast(m: MatLike): Matrix2d
Name | Description |
---|---|
|
|
Matrix2d
clone()
Public method
clone(): Matrix2d
Compose()
Public static method
static Compose(...matrices: MatLike[]): Matrix2d
Name | Description |
---|---|
|
|
Matrix2d
decompose()
Public method
decompose(): MatrixInfo
Decompose()
Public static method
static Decompose(m: MatLike): MatrixInfo
Name | Description |
---|---|
|
|
MatrixInfo
decomposed()
Public method
decomposed(): MatrixInfo
equals()
Public method
equals(m: Matrix2d | Matrix2dModel): boolean
Name | Description |
---|---|
|
|
boolean
From()
Public static method
static From(m: MatLike): Matrix2d
Name | Description |
---|---|
|
|
Matrix2d
identity()
Public method
identity(): this
Identity()
Public static method
static Identity(): Matrix2d
Inverse()
Public static method
static Inverse(m: Matrix2dModel): Matrix2dModel
Name | Description |
---|---|
|
|
Matrix2dModel
invert()
Public method
invert(): this
multiply()
Public method
multiply(m: Matrix2d | Matrix2dModel): this
Name | Description |
---|---|
|
|
this
Multiply()
Public static method
static Multiply(m1: Matrix2dModel, m2: Matrix2dModel): Matrix2dModel
Name | Description |
---|---|
|
|
|
|
Matrix2dModel
point()
Public method
point(): Vec2d
Point()
Public static method
static Point(m: MatLike): Vec2d
Name | Description |
---|---|
|
|
Vec2d
rotate()
Public method
rotate(r: number, cx?: number, cy?: number): Matrix2d
Name | Description |
---|---|
|
|
|
|
|
|
Matrix2d
Rotate()
Public static method
static Rotate(r: number, cx?: number, cy?: number): Matrix2d
Name | Description |
---|---|
|
|
|
|
|
|
Matrix2d
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: Matrix2dModel): 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): Matrix2d
Name | Description |
---|---|
|
|
|
|
Matrix2d
Translate()
Public static method
static Translate(x: number, y: number): Matrix2d
Name | Description |
---|---|
|
|
|
|
Matrix2d