RT 。????ctx.rotate(-90*Math.PI/180);逆時(shí)針旋轉(zhuǎn)90度后如何移回來? ?? ctx.drawImage(img,0,0);//?????????????????????順時(shí)針旋轉(zhuǎn)180
????????????????if(this.x>0){
????????????????????ctx.rotate(180*Math.PI/180);
????????????????????ctx.translate(-this.x-this.w,-this.y-this.h);
????????????????????ctx.drawImage(img,0,0);
????????????????}
canvas rotate與translate
荼酒
2016-04-08 11:59:53