我正在開發一個HTML5畫布圖像應用程序,您可以在其中進行90º旋轉,水平和垂直翻轉等基本轉換。圖像旋轉+水平或垂直翻轉
我用下面的矩陣來繪製圖像:
matrix.scale(flipHorizontal, flipVertical); // Where each flip could be 1 or -1
matrix.rotateZ(angle); // Angle could be 0,90,180 or 270º
一切看起來都在一開始很好,但是當我做一個rotate90º和水平翻轉後,只是相當於一個垂直翻轉。
任何想法如何解決它?
example http://img688.imageshack.us/img688/1570/73811955.jpg