Package | flash.display |
Class | public final class GraphicsBitmapFill |
Inheritance | GraphicsBitmapFill Object |
Implements | IGraphicsFill, IGraphicsData |
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Use a GraphicsBitmapFill object with the Graphics.drawGraphicsData()
method.
Drawing a GraphicsBitmapFill object is the equivalent of calling the Graphics.beginBitmapFill()
method.
Related API Elements
Property | Defined By | ||
---|---|---|---|
bitmapData : BitmapData
A transparent or opaque bitmap image. | GraphicsBitmapFill | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
matrix : Matrix
A matrix object (of the flash.geom.Matrix class) that
defines transformations on the bitmap. | GraphicsBitmapFill | ||
repeat : Boolean
Specifies whether to repeat the bitmap image in a tiled pattern. | GraphicsBitmapFill | ||
smooth : Boolean
Specifies whether to apply a smoothing algorithm to the bitmap image. | GraphicsBitmapFill |
Method | Defined By | ||
---|---|---|---|
GraphicsBitmapFill(bitmapData:BitmapData = null, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false)
Creates a new GraphicsBitmapFill object. | GraphicsBitmapFill | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object |
bitmapData | property |
public var bitmapData:BitmapData
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
A transparent or opaque bitmap image.
Related API Elements
matrix | property |
public var matrix:Matrix
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
A matrix object (of the flash.geom.Matrix class) that defines transformations on the bitmap. For example, the following matrix rotates a bitmap by 45 degrees (pi/4 radians):
matrix = new flash.geom.Matrix(); matrix.rotate(Math.PI / 4);
Related API Elements
repeat | property |
public var repeat:Boolean
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Specifies whether to repeat the bitmap image in a tiled pattern.
If true
, the bitmap image repeats in a tiled pattern. If
false
, the bitmap image does not repeat, and the outermost pixels along
the edges of the bitmap are used for any fill area that extends beyond the bounds of the bitmap.
For example, consider the following bitmap (a 20 x 20-pixel checkerboard pattern):
When repeat
is set to true
(as in the following example), the bitmap fill
repeats the bitmap:
When repeat
is set to false
, the bitmap fill uses the edge
pixels for the fill area outside the bitmap:
smooth | property |
public var smooth:Boolean
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Specifies whether to apply a smoothing algorithm to the bitmap image.
If false
, upscaled bitmap images are rendered by using a
nearest-neighbor algorithm and look pixelated. If true
, upscaled
bitmap images are rendered by using a bilinear algorithm. Rendering by using the nearest
neighbor algorithm is usually faster.
GraphicsBitmapFill | () | Constructor |
public function GraphicsBitmapFill(bitmapData:BitmapData = null, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false)
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Creates a new GraphicsBitmapFill object.
ParametersbitmapData:BitmapData (default = null ) — A transparent or opaque bitmap image that contains the bits to display.
| |
matrix:Matrix (default = null ) — A matrix object (of the flash.geom.Matrix class), which you use to
define transformations on the bitmap.
| |
repeat:Boolean (default = true ) — If true , the bitmap image repeats in a tiled pattern. If
false , the bitmap image does not repeat, and the edges of the bitmap are
used for any fill area that extends beyond the bitmap.
| |
smooth:Boolean (default = false ) — If false , upscaled bitmap images are rendered using a
nearest-neighbor algorithm and appear pixelated. If true , upscaled
bitmap images are rendered using a bilinear algorithm. Rendering that uses the nearest-neighbor
algorithm is usually faster.
|
Related API Elements
Thu Dec 6 2018, 01:12 PM -08:00