Implemented a transform of the mask.