Refactored Transformations to build the AffineTransform matrix manually.