| 包 | flash.display |
| 类 | public final class GraphicsBitmapFill |
| 继承 | GraphicsBitmapFill Object |
| 实现 | IGraphicsFill, IGraphicsData |
| 语言版本: | ActionScript 3.0 |
| 运行时版本: | Flash Player 10, AIR 1.5 |
将 GraphicsBitmapFill 对象与 Graphics.drawGraphicsData() 方法一起使用。绘制 GraphicsBitmapFill 对象与调用 Graphics.beginBitmapFill() 方法是等效的。
另请参见
| 属性 | 定义方 | ||
|---|---|---|---|
| bitmapData : BitmapData 透明的或不透明的位图图像。 | GraphicsBitmapFill | ||
![]() | constructor : Object
对类对象或给定对象实例的构造函数的引用。 | Object | |
| matrix : Matrix 一个用于定义位图上的转换的 Matrix 对象(属于 flash.geom.Matrix 类)。 | GraphicsBitmapFill | ||
![]() | prototype : Object [静态]
对类或函数对象的原型对象的引用。 | Object | |
| repeat : Boolean 指定是否以平铺模式重复位图图像。 | GraphicsBitmapFill | ||
| smooth : Boolean 指定是否将平滑处理算法应用于位图图像。 | GraphicsBitmapFill | ||
| 方法 | 定义方 | ||
|---|---|---|---|
GraphicsBitmapFill(bitmapData:BitmapData = null, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false) 创建新的 GraphicsBitmapFill 对象。 | GraphicsBitmapFill | ||
![]() |
指示对象是否已经定义了指定的属性。 | Object | |
![]() |
指示 Object 类的实例是否在指定为参数的对象的原型链中。 | Object | |
![]() |
指示指定的属性是否存在、是否可枚举。 | Object | |
![]() |
设置循环操作动态属性的可用性。 | Object | |
![]() |
返回指定对象的字符串表示形式。 | Object | |
![]() |
返回指定对象的原始值。 | Object | |
| bitmapData | 属性 |
public var bitmapData:BitmapData| 语言版本: | ActionScript 3.0 |
| 运行时版本: | Flash Player 10, AIR 1.5 |
透明的或不透明的位图图像。
另请参见
| matrix | 属性 |
public var matrix:Matrix| 语言版本: | ActionScript 3.0 |
| 运行时版本: | Flash Player 10, AIR 1.5 |
一个用于定义位图上的转换的 Matrix 对象(属于 flash.geom.Matrix 类)。例如,以下矩阵可将位图旋转 45 度(pi/4 弧度):
matrix = new flash.geom.Matrix();
matrix.rotate(Math.PI / 4);另请参见
| repeat | 属性 |
public var repeat:Boolean| 语言版本: | ActionScript 3.0 |
| 运行时版本: | Flash Player 10, AIR 1.5 |
指定是否以平铺模式重复位图图像。
如果为 true,则位图图像按平铺模式重复。如果为 false,则位图图像不会重复,并且位图边缘最外部的像素将用于所有延伸出位图边界的填充区域。
例如,请考虑下列位图(20 x 20 像素的棋盘图案):
当 repeat 设置为 true 时(如下例所示),位图填充将重复位图:
repeat 设置为 false 时,位图填充将对位图外部的填充区域使用边缘像素:
| smooth | 属性 |
public var smooth:Boolean| 语言版本: | ActionScript 3.0 |
| 运行时版本: | Flash Player 10, AIR 1.5 |
指定是否将平滑处理算法应用于位图图像。
如果为 false,则使用最近邻点算法来呈现放大的位图图像,而且该图像看起来是像素化的。如果为 true,则使用双线性算法来呈现放大的位图图像。使用最近邻点算法呈现通常较快。
| GraphicsBitmapFill | () | 构造函数 |
public function GraphicsBitmapFill(bitmapData:BitmapData = null, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false)| 语言版本: | ActionScript 3.0 |
| 运行时版本: | Flash Player 10, AIR 1.5 |
创建新的 GraphicsBitmapFill 对象。
参数bitmapData:BitmapData (default = null) — 包含要显示的位数的透明或不透明位图图像。 | |
matrix:Matrix (default = null) — 一个 Matrix 对象(属于 flash.geom.Matrix 类),您可以使用它在位图上定义转换。 | |
repeat:Boolean (default = true) —
如果为 true,则位图图像按平铺模式重复。如果为 false,位图图像不会重复,并且位图边缘将用于所有扩展出位图的填充区域。
| |
smooth:Boolean (default = false) —
如果为 false,则使用最近邻点算法来呈现放大的位图图像(带有像素化效果)。如果为 true,则使用双线性算法来呈现放大的位图图像。使用最近邻点算法呈现通常较快。
|
另请参见