class_colorrect.rst 877 B

123456789101112131415161718192021222324252627282930313233343536
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the ColorRect.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_ColorRect:
  5. ColorRect
  6. =========
  7. **Inherits:** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Colored rect for canvas.
  12. Member Variables
  13. ----------------
  14. .. _class_ColorRect_color:
  15. - :ref:`Color<class_color>` **color** - The color to fill the ``ColorRect``.
  16. ::
  17. $ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect node's color to red
  18. Description
  19. -----------
  20. An object that is represented on the canvas as a rect with color. :ref:`Color<class_color>` is used to set or get color info for the rect.