Options
All
• Public
• Public/Protected
• All

# Class AffineTransform

AffineTransform An affine transformation matrix.

### Hierarchy

• AffineTransform

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

• Concatenate `t2' to`t1' and return the result: t' = t1 * t2

### invert

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

### rotate

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

### scale

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

### translate

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

### Static concat

• Concatenate `t2' to`t1' and return the result: t' = t1 * t2

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

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

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

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

#### Returns AffineTransform

Generated using TypeDoc