Added the affine transformations for translation, scaling and rotation.