class_canvaslayer.rst 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the CanvasLayer.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_CanvasLayer:
  5. CanvasLayer
  6. ===========
  7. **Inherits:** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Inherited By:** :ref:`ParallaxBackground<class_parallaxbackground>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Canvas drawing layer.
  13. Member Functions
  14. ----------------
  15. +--------------------------------+-----------------------------------------------------------------------+
  16. | :ref:`World2D<class_world2d>` | :ref:`get_world_2d<class_CanvasLayer_get_world_2d>` **(** **)** const |
  17. +--------------------------------+-----------------------------------------------------------------------+
  18. Member Variables
  19. ----------------
  20. .. _class_CanvasLayer_custom_viewport:
  21. - :ref:`Node<class_node>` **custom_viewport** - The custom :ref:`Viewport<class_viewport>` node assigned to the ``CanvasLayer``. If null, uses the default viewport instead.
  22. .. _class_CanvasLayer_layer:
  23. - :ref:`int<class_int>` **layer** - Layer index for draw order. Lower values are drawn first. Default value: ``1``.
  24. .. _class_CanvasLayer_offset:
  25. - :ref:`Vector2<class_vector2>` **offset** - The layer's base offset.
  26. .. _class_CanvasLayer_rotation:
  27. - :ref:`float<class_float>` **rotation** - The layer's rotation in radians.
  28. .. _class_CanvasLayer_rotation_degrees:
  29. - :ref:`float<class_float>` **rotation_degrees** - The layer's rotation in degrees.
  30. .. _class_CanvasLayer_scale:
  31. - :ref:`Vector2<class_vector2>` **scale** - The layer's scale.
  32. .. _class_CanvasLayer_transform:
  33. - :ref:`Transform2D<class_transform2d>` **transform** - The layer's transform.
  34. Description
  35. -----------
  36. 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).
  37. Member Function Description
  38. ---------------------------
  39. .. _class_CanvasLayer_get_world_2d:
  40. - :ref:`World2D<class_world2d>` **get_world_2d** **(** **)** const
  41. Return the :ref:`World2D<class_world2d>` used by this layer.