.. module:: NatronEngine .. _Layer: Layer ***** **Inherits** :doc:`ItemBase` Synopsis -------- This class is used to group several shapes together and to organize them so they are rendered in a specific order. See :ref:`detailed` description... Functions ^^^^^^^^^ - def :meth:`addItem` (item) - def :meth:`getChildren` () - def :meth:`insertItem` (pos, item) - def :meth:`removeItem` (item) .. _layer.details: Detailed Description -------------------- Currently a layer acts only as a group so that you can organize shapes and control in which order they are rendered. To add a new :doc:`item` to the layer, use the :func:`addItem(item)` or the :func:`insertItem(item)` function. To remove an item from the layer, use the :func:`removeItem(item)` function. Items in a layer are rendered from top to bottom, meaning the bottom-most items will always be drawn on top of other items. Member functions description ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. method:: NatronEngine.Layer.addItem(item) :param item: :class:`ItemBase` Adds a new item at the bottom of the layer. .. method:: NatronEngine.Layer.getChildren() :rtype: :class:`sequence` Returns a sequence with all :doc:`items` in the layer. .. method:: NatronEngine.Layer.insertItem(pos, item) :param pos: :class:`int` :param item: :class:`ItemBase` Inserts a new item at the given *pos* (0 based index) in the layer. If *pos* is out of range, it will be inserted at the bottom of the layer. .. method:: NatronEngine.Layer.removeItem(item) :param item: :class:`ItemBase` Removes the *item* from the layer.