Storyboard
List of all members
LayerManager Class Reference

This interface is used to access the layers within a given panel. More...

#include <layerManager.h>

Inheritance diagram for LayerManager:
Inheritance graph
[legend]
Collaboration diagram for LayerManager:
Collaboration graph
[legend]

Public Slots

Panel Layer Manipulation
int numberOfLayers (String &panelId)
 returns number of layers in a panel More...
 
bool addVectorLayer (String &panelId, int targetLayerIdx, bool before, String &suggestedName)
 Adds a vector Layer. More...
 
bool addBitmapLayer (String &panelId, int targetLayerIdx, bool before, String &suggestedName)
 Adds a bitmap Layer. More...
 
bool isVectorLayer (String &panelId, int index)
 Returns if layer is Vector. More...
 
bool is3DLayer (String &panelId, int index)
 Returns if layer is 3D. More...
 
bool isBitmapLayer (String &panelId, int index)
 Returns if layer is Bitmap. More...
 
bool deleteLayer (String &panelId, int index)
 Deletes a given layer. More...
 
bool renameLayer (String &panelId, int index, String &suggestedName)
 Renames a given layer. More...
 
String layerName (String &panelId, int index)
 Returns name of layer. More...
 
bool importImageAsLayer (String &panelId, String &fullPathAndFileName)
 Imports image and creates a new layer at index 0, returns if successful. More...
 
bool setLayerVisible (String &panelId, int index, bool visible)
 Set layers visiblility flag. More...
 
bool layerVisibility (String &panelId, int index)
 Get layers visiblility flag. More...
 
bool setLayerOpacity (String &panelId, int index, double opacity)
 Set layers opacity value. More...
 
double layerOpacity (String &panelId, int index)
 Get layers opacity value. More...
 
bool setLayerAlignment (String &panelId, int index, String &alignment)
 Set layers alignment value. More...
 
String layerAlignment (String &panelId, int index)
 Get layers Alignment value. More...
 
String getLayerDrawingName (String &panelId, int index, bool fullPath)
 Get the path to a layer's drawing. More...
 
int getLayerElementId (String &panelId, int index)
 Return the elementId of the layer. Useful for the element/Drawing interface. More...
 
bool generateMatteLayer (String &panelId, int index, double radius, bool copyStrokes, bool replace)
 Generate Matte layer of the specified layer using current color. More...
 
bool generateMatteLayer (String &panelId, int index, double radius, bool copyStrokes, bool replace, unsigned int red, unsigned int green, unsigned int blue)
 Generate Matte layer of the specified layer with specified color. More...
 

Detailed Description

This interface is used to access the layers within a given panel.

The following examples are provided:

var lm = new LayerManager();
var sb = new StoryboardManager();
// get the first panel in the project.
var panelId = sb.panelInProject(0);
// Add 2 blank vector layers and 1 blank bitmap layer. Set the last one to invisible
lm.addVectorLayer( panelId, 0, false, "V-A");
lm.addVectorLayer( panelId, 1, false, "V-B");
lm.addBitmapLayer( panelId, 2, false, "B-A");
lm.setLayerVisible( panelId, 2, false);
// prepend a new layer by importing an image.
lm.importImageAsLayer(panelId, "/fullPath/Image.tga");

Member Function Documentation

bool LayerManager::addBitmapLayer ( String &  panelId,
int  targetLayerIdx,
bool  before,
String &  suggestedName 
)
slot

Adds a bitmap Layer.

Parameters
panelId- uniqueId of the panel
targetLayerIdx- index of sibling layer
before- whether new layer is before or after sibling layer
suggestedName- suggested Name
bool LayerManager::addVectorLayer ( String &  panelId,
int  targetLayerIdx,
bool  before,
String &  suggestedName 
)
slot

Adds a vector Layer.

Parameters
panelId- uniqueId of the panel
targetLayerIdx- index of sibling layer
before- whether new layer is before or after sibling layer
suggestedName- suggested Name
bool LayerManager::deleteLayer ( String &  panelId,
int  index 
)
slot

Deletes a given layer.

Parameters
panelId- uniqueId of the panel
index- index of layer
bool LayerManager::generateMatteLayer ( String &  panelId,
int  index,
double  radius,
bool  copyStrokes,
bool  replace 
)
slot

Generate Matte layer of the specified layer using current color.

Parameters
panelId- uniqueId of the panel
index- index of layer
radius- matte radius
copyStrokes- boolean if strokes should be copied
replace- boolean to replace existing layer (with the same name), otherwise both will be kept
bool LayerManager::generateMatteLayer ( String &  panelId,
int  index,
double  radius,
bool  copyStrokes,
bool  replace,
unsigned int  red,
unsigned int  green,
unsigned int  blue 
)
slot

Generate Matte layer of the specified layer with specified color.

Parameters
panelId- uniqueId of the panel
index- index of layer
radius- matte radius
copyStrokes- boolean if strokes should be copied
replace- boolean to replace existing layer (with the same name), otherwise both will be kept
red- unsigned int red value (0..255) for custom color, value bigger than 255 will be clamped
green- unsigned int green value (0..255) for custom color, value bigger than 255 will be clamped
blue- unsigned int blue value (0..255) for custom color, value bigger than 255 will be clamped
String LayerManager::getLayerDrawingName ( String &  panelId,
int  index,
bool  fullPath 
)
slot

Get the path to a layer's drawing.

Parameters
panelId- uniqueId of the panel
index- index of layer
fullPath- boolean to determinefileName or fullPath and fileName
int LayerManager::getLayerElementId ( String &  panelId,
int  index 
)
slot

Return the elementId of the layer. Useful for the element/Drawing interface.

Parameters
panelId- uniqueId of the panel
index- index of layer
bool LayerManager::importImageAsLayer ( String &  panelId,
String &  fullPathAndFileName 
)
slot

Imports image and creates a new layer at index 0, returns if successful.

Parameters
panelId- uniqueId of the panel
fullPathAndFileName- absolute path to image file
bool LayerManager::is3DLayer ( String &  panelId,
int  index 
)
slot

Returns if layer is 3D.

Parameters
panelId- uniqueId of the panel
index- index of layer
bool LayerManager::isBitmapLayer ( String &  panelId,
int  index 
)
slot

Returns if layer is Bitmap.

Parameters
panelId- uniqueId of the panel
index- index of layer
bool LayerManager::isVectorLayer ( String &  panelId,
int  index 
)
slot

Returns if layer is Vector.

Parameters
panelId- uniqueId of the panel
index- index of layer
String LayerManager::layerAlignment ( String &  panelId,
int  index 
)
slot

Get layers Alignment value.

Parameters
panelId- uniqueId of the panel
index- index of layer
String LayerManager::layerName ( String &  panelId,
int  index 
)
slot

Returns name of layer.

Parameters
panelId- uniqueId of the panel
index- index of layer
double LayerManager::layerOpacity ( String &  panelId,
int  index 
)
slot

Get layers opacity value.

Parameters
panelId- uniqueId of the panel
index- index of layer
bool LayerManager::layerVisibility ( String &  panelId,
int  index 
)
slot

Get layers visiblility flag.

Parameters
panelId- uniqueId of the panel
index- index of layer
int LayerManager::numberOfLayers ( String &  panelId)
slot

returns number of layers in a panel

Parameters
panelId- uniqueId of the panel
bool LayerManager::renameLayer ( String &  panelId,
int  index,
String &  suggestedName 
)
slot

Renames a given layer.

Parameters
panelId- uniqueId of the panel
index- index of layer
suggestedName- suggested Name
bool LayerManager::setLayerAlignment ( String &  panelId,
int  index,
String &  alignment 
)
slot

Set layers alignment value.

Parameters
panelId- uniqueId of the panel
index- index of layer
alignment- value between 0 and 100
bool LayerManager::setLayerOpacity ( String &  panelId,
int  index,
double  opacity 
)
slot

Set layers opacity value.

Parameters
panelId- uniqueId of the panel
index- index of layer
opacity- value between 0 and 100
bool LayerManager::setLayerVisible ( String &  panelId,
int  index,
bool  visible 
)
slot

Set layers visiblility flag.

Parameters
panelId- uniqueId of the panel
index- index of layer
visible- boolean flag

The documentation for this class was generated from the following file: