应对createjs编写的一些小方法

//必须得等图片加载完才可使用

//
处理图片大小的函数 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; }

 

posted @ 2016-12-24 16:48  愿随风浪迹天涯  阅读(254)  评论(0编辑  收藏  举报