摘要: AS3用BitmapData类来处理Bitmap对象的数据,通过直接操作 BitmapData 对象,我们可以创建复杂的图像。一.构造BitmapData类var myBitmap:BitmapData = new BitmapData(width:Number, height:Number, transparent:Boolean, fillColor:uinit);通过这个构造函数,我们等于为BitmapData定义了下面的属性。width:位图图像的宽度,以像素为单位。height:位图图像的高度,以像素为单位。rect:定义位图图像大小和位置的矩形。transparent:定义位图图像 阅读全文
posted @ 2013-04-18 21:21 Jingle Guo 阅读(1804) 评论(0) 推荐(0) 编辑
摘要: Graphics 类包含用于绘制线条、填充和形状的属性和方法。无法通过 ActionScript 代码直接创建 Graphics 对象。我们通过 Shape、Sprite 和 MovieClip 对象里的graphics属性来进行绘图。Graphics 类是最终类;无法从其派生子类。一.画图前需要先定义线条或填充样式lineBitmapStyle(bitmap:BitmapData, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false):void指定一个位图,用于绘制线条时的线条笔触。 line... 阅读全文
posted @ 2013-04-18 19:49 Jingle Guo 阅读(1604) 评论(0) 推荐(0) 编辑