Interface ILayer
interface ILayer
Extends com.amazon.apmf.IStandard
Fundamental layer abstraction to compose a layer tree for rendering purpose
Methods
getParent()
This method returns the parent layer of the current layer. If the current layer is the root layer or does not have a parent, the method returnsILayer?getParent()
nullptr.
Returns
ILayer?
The return value is optional and might be absent.
ILayer the parent layer, or nullptr if there is no parent.
getChildren()
This method returns an array of the direct child layers of this layer.ILayer*[]getChildren()
Returns
ILayer*[]
An array containing the direct child layers of this layer, or an empty array if
this layer has no children.
getSize()
Size getSize()
This method returns the dimension of the layer
Returns
Size
Size
setSize()
This method sets dimension of the layervoidsetSize(Sizesize)
Parameters
size
Size — Required
to specify the dimension of the layer
addChild()
This method adds given layer as child of the current layer.booladdChild(ILayer*child)
Parameters
child
ILayer* — Required
child layer
Returns
bool
true if layer is successfully added as child, false otherwise
addChildAtIndex()
This method adds given layer as child of the current layer at certain indexbooladdChildAtIndex(ILayer*child,u32index)
Parameters
child
ILayer* — Required
child layer
index
u32 — Required
target child index
Returns
bool
true if the layer is successfully added as a child. If the layer belong to any other parent, return
false.
removeChild()
This method removes the given layer from the list of childrenboolremoveChild(ILayer*child)
Parameters
child
ILayer* — Required
child layer
Returns
bool
true if removal is successful. If this is not a valid child, return false.
detachFromParent()
void detachFromParent()
This method detaches the current layer from its parent layer.
removeAllChildren()
void removeAllChildren()
This method removes all child layers of the current layer.
getStorageType()
LayerStorageType getStorageType()
This method returns storage type of the current layer.
Returns
LayerStorageType
Layer storage type of the current layer
setStorageType()
This method sets storage type of the layer.voidsetStorageType(LayerStorageTypestorage)
Parameters
storage
LayerStorageType — Required
storage type which needs to be set to the layer

