Class Matrix2D

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number): Matrix2D

Parameters

  • a?: number optional
  • b?: number optional
  • c?: number optional
  • d?: number optional
  • tx?: number optional
  • ty?: number optional

Returns

Matrix2D

Properties

public static DEG_TO_RAD: number

public a: number

public alpha: number

public b: number

public c: number

public compositeOperation: string

public d: number

public static identity: Matrix2D

public shadow: Shadow

public tx: number

public ty: number

Methods

public append(a: number, b: number, c: number, d: number, tx: number, ty: number): Matrix2D

Parameters

  • a: number
  • b: number
  • c: number
  • d: number
  • tx: number
  • ty: number

Returns

Matrix2D

public appendMatrix(matrix: Matrix2D): Matrix2D

Parameters

Returns

Matrix2D

public appendProperties(alpha: number, shadow: Shadow, compositeOperation: string): Matrix2D

Parameters

  • alpha: number
  • shadow: Shadow
  • compositeOperation: string

Returns

Matrix2D

public appendTransform(x: number, y: number, scaleX: number, scaleY: number, rotation: number, skewX: number, skewY: number, regX?: number, regY?: number): Matrix2D

Parameters

  • x: number
  • y: number
  • scaleX: number
  • scaleY: number
  • rotation: number
  • skewX: number
  • skewY: number
  • regX?: number optional
  • regY?: number optional

Returns

Matrix2D

public clone(): Matrix2D

Returns

Matrix2D

public copy(matrix: Matrix2D): Matrix2D

Parameters

Returns

Matrix2D

public decompose(target: Object): Matrix2D

Parameters

  • target: Object

Returns

Matrix2D

public identity(): Matrix2D

Returns

Matrix2D

public initialize(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number): Matrix2D

Parameters

  • a?: number optional
  • b?: number optional
  • c?: number optional
  • d?: number optional
  • tx?: number optional
  • ty?: number optional

Returns

Matrix2D

public invert(): Matrix2D

Returns

Matrix2D

public isIdentity(): boolean

Returns

boolean

public prepend(a: number, b: number, c: number, d: number, tx: number, ty: number): Matrix2D

Parameters

  • a: number
  • b: number
  • c: number
  • d: number
  • tx: number
  • ty: number

Returns

Matrix2D

public prependMatrix(matrix: Matrix2D): Matrix2D

Parameters

Returns

Matrix2D

public prependProperties(alpha: number, shadow: Shadow, compositeOperation: string): Matrix2D

Parameters

  • alpha: number
  • shadow: Shadow
  • compositeOperation: string

Returns

Matrix2D

public prependTransform(x: number, y: number, scaleX: number, scaleY: number, rotation: number, skewX: number, skewY: number, regX?: number, regY?: number): Matrix2D

Parameters

  • x: number
  • y: number
  • scaleX: number
  • scaleY: number
  • rotation: number
  • skewX: number
  • skewY: number
  • regX?: number optional
  • regY?: number optional

Returns

Matrix2D

public reinitialize(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number, alpha?: number, shadow?: Shadow, compositeOperation?: string): Matrix2D

Parameters

  • a?: number optional
  • b?: number optional
  • c?: number optional
  • d?: number optional
  • tx?: number optional
  • ty?: number optional
  • alpha?: number optional
  • shadow?: Shadow optional
  • compositeOperation?: string optional

Returns

Matrix2D

public rotate(angle: number): Matrix2D

Parameters

  • angle: number

Returns

Matrix2D

public scale(x: number, y: number): Matrix2D

Parameters

  • x: number
  • y: number

Returns

Matrix2D

public skew(skewX: number, skewY: number): Matrix2D

Parameters

  • skewX: number
  • skewY: number

Returns

Matrix2D

public toString(): string

Returns

string

public transformPoint(x: number, y: number, pt?: Point): Point

Parameters

  • x: number
  • y: number
  • pt?: Point optional

Returns

Point

public transformPoint(x: number, y: number, pt?: Object): Point

Parameters

  • x: number
  • y: number
  • pt?: Object optional

Returns

Point

public translate(x: number, y: number): Matrix2D

Parameters

  • x: number
  • y: number

Returns

Matrix2D