Options
All
  • Public
  • Public/Protected
  • All
Menu

An affine transformation that can transform points.

Hierarchy

  • AffineTransformation

Index

Methods

  • Concatenate a transformation after this one.

    Parameters

    Returns void

  • Check if this is equals to another transformation.

    Parameters

    Returns boolean

  • flipX(anchorX: number): void
  • Concatenate an horizontal flip.

    Parameters

    • anchorX: number

      The flip anchor point X.

    Returns void

  • flipY(anchorY: number): void
  • Concatenate an vertical flip.

    Parameters

    • anchorY: number

      The flip anchor point Y.

    Returns void

  • isIdentity(): boolean
  • Check if this transformation is the identity.

    Returns boolean

  • Check if this is almost equals to another transformation.

    Parameters

    • other: AffineTransformation

      The transformation to check.

    • epsilon: number

      The relative margin error.

    Returns boolean

  • Concatenate a transformation before this one.

    Parameters

    Returns void

  • rotate(angle: number): void
  • Concatenate a rotation.

    Parameters

    • angle: number

      The angle of rotation in radians.

    Returns void

  • rotateAround(angle: number, anchorX: number, anchorY: number): void
  • Concatenate a rotation.

    Parameters

    • angle: number

      The angle of rotation in radians.

    • anchorX: number

      The rotation anchor point X.

    • anchorY: number

      The rotation anchor point Y.

    Returns void

  • scale(sx: number, sy: number): void
  • Concatenate a scale.

    Parameters

    • sx: number

      The horizontal scale value.

    • sy: number

      The vertical scale value.

    Returns void

  • setToFlipX(anchorX: number): void
  • Reset to an horizontal flip.

    Parameters

    • anchorX: number

      The flip anchor point X.

    Returns void

  • setToFlipY(anchorY: number): void
  • Reset to an vertical flip.

    Parameters

    • anchorY: number

      The flip anchor point Y.

    Returns void

  • setToIdentity(): void
  • Reset to the identity.

    Returns void

  • setToRotation(theta: number): void
  • Reset to a rotation.

    Parameters

    • theta: number

    Returns void

  • setToRotationAround(angle: number, anchorX: number, anchorY: number): void
  • Reset to a rotation.

    Parameters

    • angle: number

      The angle of rotation in radians.

    • anchorX: number

      The rotation anchor point X.

    • anchorY: number

      The rotation anchor point Y.

    Returns void

  • setToScale(sx: number, sy: number): void
  • Reset to a scale.

    Parameters

    • sx: number

      The horizontal scale value.

    • sy: number

      The vertical scale value.

    Returns void

  • setToTranslation(tx: number, ty: number): void
  • Reset to a translation.

    Parameters

    • tx: number
    • ty: number

    Returns void

  • toString(): string
  • Returns string

  • transform(source: FloatPoint, destination: FloatPoint): void
  • Transform a point.

    Parameters

    • source: FloatPoint

      The point to transform.

    • destination: FloatPoint

      The Point to store the transformed coordinates.

    Returns void

  • translate(tx: number, ty: number): void
  • Concatenate a translation.

    Parameters

    • tx: number

      The horizontal translation value.

    • ty: number

      The vertical translation value.

    Returns void

Constructors

Properties

matrix: Float32Array

Generated using TypeDoc