应对createjs编写的一些小方法
时间:2016-12-24 19:34:34
收藏:0
阅读:229
//必须得等图片加载完才可使用
//处理图片大小的函数 function imgScale(bitmap,w,h){ var b=bitmap.getBounds(); bitmap.scaleX=w/b.width; bitmap.scaleY=h/b.height; } // 旋转图片 function rot(con,rot,x,y){ if(x==‘undefined‘)x=0; if(y==‘undefined‘)y=0; con.regX=x; con.regY=y; con.rotation=rot; }
原文:http://www.cnblogs.com/jweilan/p/6217850.html
评论(0)