Options
All
• Public
• Public/Protected
• All

# Class AffineTransformation

An affine transformation that can transform points.

### Hierarchy

• AffineTransformation

## Methods

• Concatenate a transformation after this one.

#### Parameters

• ##### other: AffineTransformation

The transformation to concatenate.

#### Returns void

• Copy a transformation.

#### Parameters

• ##### other: AffineTransformation

The transformation to copy.

#### Returns AffineTransformation

• Check if this is equals to another transformation.

#### Parameters

• ##### other: AffineTransformation

The transformation to check.

#### 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 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

• ##### other: AffineTransformation

The transformation to concatenate.

#### 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
• setToRotation(theta: number): 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.

#### Returns void

• toString(): 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.

## Properties

matrix: Float32Array

Generated using TypeDoc