Libart: Affine Transformations

Libart uses a double[6] array to represent affine transforms. A new point (x', y') is determined from an original point (x, y) according to the following equations:

x' = affine[0]x + affine[2]y + affine[4]

y' = affine[1]x + affine[3]y + affine[5]

Affine transformations cover rotation, translation, scaling, squashing, and skewing, as well as all combinations of the above. Affine transformations have many nice properties, including being closed under composition, invertible, and very easy to use in computations. Many important geometric data structures and operations are invariant under affine transformation, including the representation of Bézier paths.