123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the CanvasLayer.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_CanvasLayer:
- CanvasLayer
- ===========
- **Inherits:** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
- **Inherited By:** :ref:`ParallaxBackground<class_parallaxbackground>`
- **Category:** Core
- Brief Description
- -----------------
- Canvas drawing layer.
- Member Functions
- ----------------
- +--------------------------------+-----------------------------------------------------------------------+
- | :ref:`World2D<class_world2d>` | :ref:`get_world_2d<class_CanvasLayer_get_world_2d>` **(** **)** const |
- +--------------------------------+-----------------------------------------------------------------------+
- Member Variables
- ----------------
- .. _class_CanvasLayer_custom_viewport:
- - :ref:`Node<class_node>` **custom_viewport** - The custom :ref:`Viewport<class_viewport>` node assigned to the ``CanvasLayer``. If null, uses the default viewport instead.
- .. _class_CanvasLayer_layer:
- - :ref:`int<class_int>` **layer** - Layer index for draw order. Lower values are drawn first. Default value: ``1``.
- .. _class_CanvasLayer_offset:
- - :ref:`Vector2<class_vector2>` **offset** - The layer's base offset.
- .. _class_CanvasLayer_rotation:
- - :ref:`float<class_float>` **rotation** - The layer's rotation in radians.
- .. _class_CanvasLayer_rotation_degrees:
- - :ref:`float<class_float>` **rotation_degrees** - The layer's rotation in degrees.
- .. _class_CanvasLayer_scale:
- - :ref:`Vector2<class_vector2>` **scale** - The layer's scale.
- .. _class_CanvasLayer_transform:
- - :ref:`Transform2D<class_transform2d>` **transform** - The layer's transform.
- Description
- -----------
- Canvas drawing layer. :ref:`CanvasItem<class_canvasitem>` nodes that are direct or indirect children of a ``CanvasLayer`` will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a ``CanvasLayer`` with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
- Member Function Description
- ---------------------------
- .. _class_CanvasLayer_get_world_2d:
- - :ref:`World2D<class_world2d>` **get_world_2d** **(** **)** const
- Return the :ref:`World2D<class_world2d>` used by this layer.
|