Implementing #944 (Feature request: texture rotation)

I didn't implement the rotate function, as described in #944. Something about it seems off.
While it makes sense to have a generic rotate function, I don't like introducing confusing behavior.
Better to keep each function separate and call them as needed.