Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AffineTransform

AffineTransform An affine transformation matrix.

Hierarchy

  • AffineTransform

Index

Properties

a

a: number

The entry at position [1,1] in the matrix.

b

b: number

The entry at position [1,2] in the matrix.

c

c: number

The entry at position [2,1] in the matrix.

d

d: number

The entry at position [2,2] in the matrix.

identity

identity: boolean

Return true if `t' is the identity transform, false otherwise.

tx

tx: number

The entry at position [3,1] in the matrix.

ty

ty: number

The entry at position [3,2] in the matrix.

Methods

concat

invert

  • Invert t' and return the result. Ift' has zero determinant, then `t' is returned unchanged.

    Parameters

    Returns AffineTransform

rotate

  • Rotate t' byangle' radians and return the result: t' = [ cos(angle) sin(angle) -sin(angle) cos(angle) 0 0 ] * t

    Parameters

    • angle: number

    Returns AffineTransform

scale

  • Scale t' by(sx, sy)' and return the result: t' = [ sx 0 0 sy 0 0 ] * t

    Parameters

    • sx: number
    • sy: number

    Returns AffineTransform

translate

  • Translate t' by(tx, ty)' and return the result: t' = [ 1 0 0 1 tx ty ] * t

    Parameters

    • tx: number
    • ty: number

    Returns AffineTransform

Static concat

Static make

  • make(a: number, b: number, c: number, d: number, tx: number, ty: number): AffineTransform
  • Returns an affine transformation matrix constructed from values you provide.

    Parameters

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

    Returns AffineTransform

Static makeRotation

  • makeRotation(a: number, b: number, c: number, d: number, tx: number, ty: number): AffineTransform
  • Return a transform which rotates by `angle' radians: t' = [ cos(angle) sin(angle) -sin(angle) cos(angle) 0 0 ]

    Parameters

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

    Returns AffineTransform

Static makeScale

  • makeScale(a: number, b: number, c: number, d: number, tx: number, ty: number): AffineTransform
  • Return a transform which scales by `(sx, sy)': t' = [ sx 0 0 sy 0 0 ]

    Parameters

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

    Returns AffineTransform

Static makeTranslation

  • makeTranslation(a: number, b: number, c: number, d: number, tx: number, ty: number): AffineTransform
  • Return a transform which translates by `(tx, ty)': t' = [ 1 0 0 1 tx ty ]

    Parameters

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

    Returns AffineTransform

Generated using TypeDoc