mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
81 lines
2.5 KiB
ReStructuredText
81 lines
2.5 KiB
ReStructuredText
.. 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:`RID<class_rid>` | :ref:`get_canvas<class_CanvasLayer_get_canvas>` **(** **)** 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).
|
|
|
|
Tutorials
|
|
---------
|
|
|
|
- :doc:`../tutorials/2d/2d_transforms`
|
|
- :doc:`../tutorials/2d/canvas_layers`
|
|
|
|
Member Function Description
|
|
---------------------------
|
|
|
|
.. _class_CanvasLayer_get_canvas:
|
|
|
|
- :ref:`RID<class_rid>` **get_canvas** **(** **)** const
|
|
|
|
Returns the RID of the canvas used by this layer.
|
|
|
|
|