# Class AffineTransform

AffineTransform

A 3x3 matrix used to transform source coordinates (x1, y1) into destination coordinates (x2, y2) according to matrix multiplication:

```[ x2 ]   [ scaleX shearX translateX ] [ x1 ]
[ y2 ] = [ shearY scaleY translateY ] [ y1 ]
[ 1  ]   [   0      0        1      ] [ 1  ]```

After transformation,

```x2 = scaleX * x1 + shearX * y1 + translateX
y2 = scaleY * y1 + shearY * x1 + translateY```

### Methods

MethodReturn typeBrief description
`getScaleX()``Number`Gets the X coordinate scaling element.
`getScaleY()``Number`Gets the Y coordinate scaling element.
`getShearX()``Number`Gets the X coordinate shearing element.
`getShearY()``Number`Gets the Y coordinate shearing element.
`getTranslateX()``Number`Gets the X coordinate translation element in points.
`getTranslateY()``Number`Gets the Y coordinate translation element in points.
`toBuilder()``AffineTransformBuilder`Returns a new `AffineTransformBuilder` based on this transform.

## Detailed documentation

### `getScaleX()`

Gets the X coordinate scaling element.

`Number`

### `getScaleY()`

Gets the Y coordinate scaling element.

`Number`

### `getShearX()`

Gets the X coordinate shearing element.

`Number`

### `getShearY()`

Gets the Y coordinate shearing element.

`Number`

### `getTranslateX()`

Gets the X coordinate translation element in points.

`Number`

### `getTranslateY()`

Gets the Y coordinate translation element in points.

`Number`

### `toBuilder()`

Returns a new `AffineTransformBuilder` based on this transform.

#### Return

`AffineTransformBuilder`

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]
{ "last_modified": "Last updated 2018-06-26 UTC.", "state": "" }