Apache Flex 4.16.1 API Reference | All Packages | All Classes | Index | Frames No Frames |
BitmapUtil

Package | spark.utils
Class | public class BitmapUtil
Inheritance | BitmapUtil 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 Methods

| Method | Defined 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

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.

Wed Nov 15 2017, 09:50 AM +01:00