Added support for rotation.