Packagede.popforge.imageprocessing.core
Classpublic final class Layer

The Layer class defines a layer that is used in a LayerManager.

See also

de.popforge.imageprocessing.core.Image


Public Properties
 PropertyDefined by
  blendMode : String
The blend mode of the layer.
Layer
  image : Image
[read-only] The image of the layer.
Layer
  opacity : Number
The opacity of the layer.
Layer
  parent : LayerManager
[write-only] Sets the parent of the current layer.
Layer
  translate : Matrix
[read-only] The matrix that holds the translation information of the layer.
Layer
  x : int
The x position of the layer in pixel.
Layer
  y : int
The y position of the layer in pixel.
Layer
Public Methods
 MethodDefined by
  
Layer(image:Image, opacity:Number, blendMode:String = "normal", x:int = 0, y:int = 0)
Creates a new Layer object.
Layer
Property detail
blendModeproperty
blendMode:String  [read-write]

The blend mode of the layer.

Implementation
    public function get blendMode():String
    public function set blendMode(value:String):void
imageproperty 
image:Image  [read-only]

The image of the layer.

Implementation
    public function get image():Image
opacityproperty 
opacity:Number  [read-write]

The opacity of the layer.

Implementation
    public function get opacity():Number
    public function set opacity(value:Number):void
parentproperty 
parent:LayerManager  [write-only]

Sets the parent of the current layer.

Implementation
    public function set parent(value:LayerManager):void
translateproperty 
translate:Matrix  [read-only]

The matrix that holds the translation information of the layer.

This matrix is used when the LayerManager merges all the layers into one rendered image.

Implementation
    public function get translate():Matrix
xproperty 
x:int  [read-write]

The x position of the layer in pixel.

Implementation
    public function get x():int
    public function set x(value:int):void
yproperty 
y:int  [read-write]

The y position of the layer in pixel.

Implementation
    public function get y():int
    public function set y(value:int):void
Constructor detail
Layer()constructor
public function Layer(image:Image, opacity:Number, blendMode:String = "normal", x:int = 0, y:int = 0)

Creates a new Layer object.

Parameters
image:Image — The image that this layer contains.
 
opacity:Number — The opacity of the layer from 0 to 1.
 
blendMode:String (default = "normal") — Any value of flash.display.BlendMode.
 
x:int (default = 0) — The x position of the layer.
 
y:int (default = 0) — The y position of the layer