class_colorrect.rst 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the ColorRect.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_ColorRect:
  6. ColorRect
  7. =========
  8. **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. Colored rectangle.
  10. Description
  11. -----------
  12. Displays a colored rectangle.
  13. Properties
  14. ----------
  15. +---------------------------+----------------------------------------------+-------------------------+
  16. | :ref:`Color<class_Color>` | :ref:`color<class_ColorRect_property_color>` | ``Color( 1, 1, 1, 1 )`` |
  17. +---------------------------+----------------------------------------------+-------------------------+
  18. Property Descriptions
  19. ---------------------
  20. .. _class_ColorRect_property_color:
  21. - :ref:`Color<class_Color>` **color**
  22. +-----------+-------------------------+
  23. | *Default* | ``Color( 1, 1, 1, 1 )`` |
  24. +-----------+-------------------------+
  25. | *Setter* | set_frame_color(value) |
  26. +-----------+-------------------------+
  27. | *Getter* | get_frame_color() |
  28. +-----------+-------------------------+
  29. The fill color.
  30. ::
  31. $ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect's color to red.
  32. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  33. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  34. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`