canvas rotate中心點問題詳解

ctx.fillStyle = "rgb(250,0,0)"; ctx.save(); ctx.translate(50,50); //這個translate(50,50)發生在rotate()之前,其目的是將旋轉點從默認點(0,0),移動到(50,50),下面緊跟着的rotate就是按照這個點來轉 //rotate方法的旋轉點完全是按照[在其上\緊跟着它的]translate來確定旋轉點的...
相關文章
相關標籤/搜索