ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
spark.utils 

BitmapUtil  - AS3 Flex

Packagespark.utils
Classpublic class BitmapUtil
InheritanceBitmapUtil Inheritance Object

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

This class provides bitmap-related utility functions



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
Public Methods
 MethodDefined By
  
getSnapshot(target:IUIComponent, visibleBounds:Rectangle = null, propagateColorTransform:Boolean = false):BitmapData
[static] Creates a BitmapData representation of the target object.
BitmapUtil
  
getSnapshotWithPadding(target:IUIComponent, padding:int = 4, propagateColorTransform:Boolean = false, bounds:Rectangle = null):BitmapData
[static] Creates a BitmapData representation of the target object.
BitmapUtil
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Method Detail

getSnapshot

()method
public static function getSnapshot(target:IUIComponent, visibleBounds:Rectangle = null, propagateColorTransform:Boolean = false):BitmapData

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Creates a BitmapData representation of the target object.

Parameters

target:IUIComponent — The object to capture in the resulting BitmapData
 
visibleBounds:Rectangle (default = null) — If non-null, this Rectangle will be populated with the visible bounds of the object, relative to the object itself.
 
propagateColorTransform:Boolean (default = false) — If true, the target's color transform will be applied to the bitmap capture operation.

Returns
BitmapData — A BitmapData object containing the image.

Throws
SecurityError — The target object and all of its child objects do not come from the same domain as the caller, or are not in a content that is accessible to the caller by having called the Security.allowDomain() method.

getSnapshotWithPadding

()method 
public static function getSnapshotWithPadding(target:IUIComponent, padding:int = 4, propagateColorTransform:Boolean = false, bounds:Rectangle = null):BitmapData

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Creates a BitmapData representation of the target object.

Parameters

target:IUIComponent — The object to capture in the resulting BitmapData
 
padding:int (default = 4) — Padding, in pixels, around to target to be included in the bitmap.
 
propagateColorTransform:Boolean (default = false) — If true, the target's color transform will be applied to the bitmap capture operation.
 
bounds:Rectangle (default = null) — If non-null, this Rectangle will be populated with the visible bounds of the object, relative to the object itself.

Returns
BitmapData — A BitmapData object containing the image.

Throws
SecurityError — The target object and all of its child objects do not come from the same domain as the caller, or are not in a content that is accessible to the caller by having called the Security.allowDomain() method.