| Package | com.flashdynamix.motion.layers |
| Class | public class BitmapLayer |
| Inheritance | BitmapLayer flash.display.Bitmap |
| Property | Defined by | ||
|---|---|---|---|
| bgColor : uint
The hexadecimal color defining the color for the BitmapData.
| BitmapLayer | ||
| clearOnRender : Boolean = false
If this is set to true then on each render the BitmapData will be filled with the
bgColor.
| BitmapLayer | ||
| layerHeight : int | BitmapLayer | ||
| layerWidth : int | BitmapLayer | ||
| length : int [read-only]
| BitmapLayer | ||
| list : Array
The list of IEffects to be drawn on each render.
| BitmapLayer | ||
| scale : Number | BitmapLayer | ||
| smoothing : Boolean | BitmapLayer | ||
| transparent : Boolean = false
Whether the BitmapData uses transparency.
| BitmapLayer | ||
| Method | Defined by | ||
|---|---|---|---|
|
BitmapLayer(width:Number = 500, height:Number = 500, scale:Number = 1, bgColor:uint = 0x00FFFFFF, transparent:Boolean = true, smoothing:Boolean = false)
| BitmapLayer | ||
|
Adds an IEffect into the list.
| BitmapLayer | ||
|
clear():void
Removes all IEffects from the list.
| BitmapLayer | ||
|
dispose():void
Disposes the BitmapLayer read for garbage collection
| BitmapLayer | ||
|
draw(instance:IBitmapDrawable, matrix:Matrix = null, rectangle:Rectangle = null, colorTransform:ColorTransform = null, blendMode:String = "normal"):DrawEffect
Adds a DrawEffect for the specified IBitmapDrawable to the render list.
| BitmapLayer | ||
|
Returns an IEffect from the list at the specified index.
| BitmapLayer | ||
|
Removes an IEffect from the list.
| BitmapLayer | ||
|
render(e:Event = null):void
Renders all IEffects in the list.
| BitmapLayer | ||
|
startRender():void
Starts rendering the BitmapLayer on construction rendering automatically starts.
| BitmapLayer | ||
|
stopRender():void
Stops rendering the BitmapLayer this can be resumed via the startRender method.
| BitmapLayer | ||
|
toString():String
| BitmapLayer | ||
| Method | Defined by | ||
|---|---|---|---|
|
addEvent(item:EventDispatcher, type:String, listener:Function, priority:int = 0, useWeakReference:Boolean = true):void
| BitmapLayer | ||
|
removeEvent(item:EventDispatcher, type:String, listener:Function):void
| BitmapLayer | ||
|
updateEffects():void
| BitmapLayer | ||
| bgColor | property |
public var bgColor:uintThe hexadecimal color defining the color for the BitmapData.
| clearOnRender | property |
public var clearOnRender:Boolean = falseIf this is set to true then on each render the BitmapData will be filled with the bgColor.
| layerHeight | property |
layerHeight:int [read-write]Implementation
public function get layerHeight():int
public function set layerHeight(value:int):void
| layerWidth | property |
layerWidth:int [read-write]Implementation
public function get layerWidth():int
public function set layerWidth(value:int):void
| length | property |
length:int [read-only]Implementation
public function get length():int
| list | property |
public var list:ArrayThe list of IEffects to be drawn on each render.
| scale | property |
scale:Number [read-write]Implementation
public function get scale():Number
public function set scale(value:Number):void
| smoothing | property |
smoothing:Boolean [read-write]Implementation
public function get smoothing():Boolean
public function set smoothing(value:Boolean):void
| transparent | property |
public var transparent:Boolean = falseWhether the BitmapData uses transparency.
| BitmapLayer | () | constructor |
public function BitmapLayer(width:Number = 500, height:Number = 500, scale:Number = 1, bgColor:uint = 0x00FFFFFF, transparent:Boolean = true, smoothing:Boolean = false)Parameters
width:Number (default = 500) — The width in pixels to render the BitmapLayer.
|
|
height:Number (default = 500) — The height in pixels to render the BitmapLayer.
|
|
scale:Number (default = 1) — The scale to render the BitmapLayer.
|
|
bgColor:uint (default = 0x00FFFFFF) — The hexadecimal bgColor to render the BitmapData background color.
|
|
transparent:Boolean (default = true) — Whether the BitmapData uses transparency. Not using transparency can reduce artifacts
on the BitmapData when using BlendModes like BlendMode.ADD or BlendMode.OVERLAY
|
|
smoothing:Boolean (default = false) — Whether the BitmapData uses pixel smoothing. This is useful if the BitmapLayer is animated.
|
| add | () | method |
public function add(effect:IEffect):IEffectAdds an IEffect into the list.
Parameterseffect:IEffect |
IEffect |
| addEvent | () | method |
protected function addEvent(item:EventDispatcher, type:String, listener:Function, priority:int = 0, useWeakReference:Boolean = true):voidParameters
item:EventDispatcher |
|
type:String |
|
listener:Function |
|
priority:int (default = 0) |
|
useWeakReference:Boolean (default = true) |
| clear | () | method |
public function clear():voidRemoves all IEffects from the list.
| dispose | () | method |
public function dispose():voidDisposes the BitmapLayer read for garbage collection
| draw | () | method |
public function draw(instance:IBitmapDrawable, matrix:Matrix = null, rectangle:Rectangle = null, colorTransform:ColorTransform = null, blendMode:String = "normal"):DrawEffectAdds a DrawEffect for the specified IBitmapDrawable to the render list.
Parametersinstance:IBitmapDrawable — The IBitmapDrawable instance which will be used in the DrawEffect.
|
|
matrix:Matrix (default = null) — The translation Matrix used with the DrawEffect.
|
|
rectangle:Rectangle (default = null) — The clipping Rectangle used with the DrawEffect.
|
|
colorTransform:ColorTransform (default = null) — The ColorTransform used with the DrawEffect.
|
|
blendMode:String (default = "normal") — The BlendMode used with the DrawEffect.
|
DrawEffect |
| item | () | method |
public function item(index:int):IEffectReturns an IEffect from the list at the specified index.
Parametersindex:int |
IEffect |
| remove | () | method |
public function remove(effect:IEffect):BooleanRemoves an IEffect from the list.
Parameterseffect:IEffect |
Boolean |
| removeEvent | () | method |
protected function removeEvent(item:EventDispatcher, type:String, listener:Function):voidParameters
item:EventDispatcher |
|
type:String |
|
listener:Function |
| render | () | method |
public function render(e:Event = null):voidRenders all IEffects in the list. Triggering this method manually can be handy when confronting a situation where the renders do not need to be done on a ENTER_FRAME basis or the developer would like custom control over when the render cycles occur.
Parameterse:Event (default = null) |
| startRender | () | method |
public function startRender():voidStarts rendering the BitmapLayer on construction rendering automatically starts.
| stopRender | () | method |
public function stopRender():voidStops rendering the BitmapLayer this can be resumed via the startRender method.
| toString | () | method |
public override function toString():String
Returns
String |
| updateEffects | () | method |
protected function updateEffects():void