Modified AutoResizingMask for rotation.