MatrixTransform2x3

Last updated at 1:43 am UTC on 5 August 2017

DisplayTransform variableWordSubclass: #MatrixTransform2x3

This class represents a transformation for points, that is a combination of scale, offset, and rotation. It is implemented as a 2x3 matrix containing the transformation from the local coordinate system in the global coordinate system. Thus, transforming points from local to global coordinates is fast and cheap whereas transformations from global to local coordinate systems are relatively expensive.

Implementation Note: It is assumed that the transformation deals with Integer points. All transformations will return Integer coordinates (even though float points may be passed in here).

### Examples

MatrixTransform2x3 withScale: 1@1

MatrixTransform2x3(
1.0 0.0 0.0
0.0 1.0 0.0
)

is the same as

MatrixTransform2x3 identity

MatrixTransform2x3(
1.0 0.0 0.0
0.0 1.0 0.0
)