.. 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//doc_classes. .. _class_CanvasLayer: CanvasLayer =========== **Inherits:** :ref:`Node` **<** :ref:`Object` **Inherited By:** :ref:`ParallaxBackground` **Category:** Core Brief Description ----------------- Canvas drawing layer. Member Functions ---------------- +--------------------------------+-----------------------------------------------------------------------+ | :ref:`World2D` | :ref:`get_world_2d` **(** **)** const | +--------------------------------+-----------------------------------------------------------------------+ Member Variables ---------------- .. _class_CanvasLayer_custom_viewport: - :ref:`Node` **custom_viewport** - The custom :ref:`Viewport` node assigned to the ``CanvasLayer``. If null, uses the default viewport instead. .. _class_CanvasLayer_layer: - :ref:`int` **layer** - Layer index for draw order. Lower values are drawn first. Default value: ``1``. .. _class_CanvasLayer_offset: - :ref:`Vector2` **offset** - The layer's base offset. .. _class_CanvasLayer_rotation: - :ref:`float` **rotation** - The layer's rotation in radians. .. _class_CanvasLayer_rotation_degrees: - :ref:`float` **rotation_degrees** - The layer's rotation in degrees. .. _class_CanvasLayer_scale: - :ref:`Vector2` **scale** - The layer's scale. .. _class_CanvasLayer_transform: - :ref:`Transform2D` **transform** - The layer's transform. Description ----------- Canvas drawing layer. :ref:`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` **get_world_2d** **(** **)** const Return the :ref:`World2D` used by this layer.