GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Sunday, March 27, 2011

HTML5 - Rotate

To make rotate transformation, use translate first, then rotate, then back to translate again:
ctx.translate(230,10)
ctx.rotate(45/57)
ctx.translate(-230,-10);
ctx.fillRect(230, 10, 100, 100)
Share/Bookmark

No comments:

Post a Comment