Changed JavaScript API name for signal connection and disconnection
[platform/core/uifw/dali-toolkit.git] / plugins / dali-script-v8 / docs / content / layer-actor.js
1 /**
2 ## Layer Actor API ( extends Actor API)
3
4  Layers provide a mechanism for overlaying groups of actors on top of each other.
5
6  When added to the stage, a layer can be ordered relative to other layers. The bottom
7  layer is at depth zero. The stage provides a default layer for it's children.
8
9  Layered actors inherit position etc. as normal, but are drawn in an order determined
10  by the layers. The depth buffer is cleared before each layer is rendered unless depth
11  test is disabled or there's no need for it based on the layers contents;
12  actors in lower layers cannot obscure actors in higher layers.
13
14  If depth test is disabled, there is no performance overhead from clearing the depth buffer.
15
16
17 ### Simple example
18
19 ```
20
21 var textActor1 = new dali.TextActor( "I'm above" );
22 var textActor2 = new dali.TextActor( "I'm below" );
23   
24 // add first actor to the stage
25 dali.stage.add( textActor1 );
26   
27 // create a layer and add second actor
28 var layer = new dali.Layer();
29 layer.add( textActor2 );
30 dali.stage.add( layer );  // textActor2 is now above textActor1
31   
32 // shift layer to bottom
33 layer.lowerToBottom();    // textActor2 is now below textActor1
34 ```
35
36 ### Layer Actor Specific Properties
37
38 | Name                   |    Type    | Writable     | Animatable|
39 |------------------------|------------|--------------|-----------|
40 | clippingEnabled        |BOOLEAN     | ✔     |  ✘ |
41 | clippingBox            | RECTANGLE ([0,0,400,600]) | ✔ | ✘|
42
43   @class Layer
44   @extends Actor
45  */