ActionScript 3.0 Language and Components Reference | All Packages | All Classes | Language Elements | Index | Appendixes | Conventions | Frames No Frames |
GraphicsBitmapFill

Package | flash.display
Class | public final class GraphicsBitmapFill
Inheritance | GraphicsBitmapFill Object
Implements | IGraphicsFill, IGraphicsData

Defines a bitmap fill. The bitmap can be smoothed, repeated or tiled to fill the area, or manipulated using a transformation matrix.

A GraphicsBitmapFill object can be used with the `Graphics.drawGraphicsData()` method. when this object is drawn it is the equivalent of calling the `Graphics.beginBitmapFill()` method.

See also

flash.display.Graphics.drawGraphicsData()
flash.display.Graphics.beginBitmapFill()

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| 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), which you can use to define transformations on the bitmap. | GraphicsBitmapFill
|  | prototype : Object [static] A reference to the prototype object of a class or function object. | Object
|  | repeat : Boolean Specifes whether the bitmap image should be repeat in a tiled pattern. | GraphicsBitmapFill
|  | smooth : Boolean Specifies whether to apply a smoothing algorithm to the bitmap image. | GraphicsBitmapFill

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | GraphicsBitmapFill(bitmapData:BitmapData = null, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false) Creates a new GraphicsBitmapFill object. | GraphicsBitmapFill
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Property Detail

bitmapData | property

`public var bitmapData:BitmapData`

A transparent or opaque bitmap image.

See also

flash.display.BitmapData

matrix | property |

`public var matrix:Matrix`

A matrix object (of the flash.geom.Matrix class), which you can use to define transformations on the bitmap. For instance, you can use the following matrix to rotate a bitmap by 45 degrees (pi/4 radians):

         matrix = new flash.geom.Matrix();
         matrix.rotate(Math.PI / 4);

See also

flash.geom.Matrix

repeat | property |

`public var repeat:Boolean`

Specifes whether the bitmap image should be repeat 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 bitmap's bounds.

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 of the bitmap:

smooth | property |

`public var smooth:Boolean`

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.

Constructor Detail

GraphicsBitmapFill | () | Constructor

`public function GraphicsBitmapFill(bitmapData:BitmapData = null, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false)`

Creates a new GraphicsBitmapFill object.

Parameters

| `bitmapData:BitmapData` (default = `null`)`` — A transparent or opaque bitmap image that contains the bits to be displayed.
| `matrix:Matrix` (default = `null`)`` — A matrix object (of the flash.geom.Matrix class), which you can 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 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.

See also

flash.display.Graphics.beginBitmapFill()

Submit Feedback on LiveDocs
© 2004-2008 Adobe Systems Incorporated. All rights reserved.
Tue May 20 2008, 04:02 AM -07:00