Java: Affine Transformations