class_gradienttexture1d.rst 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/GradientTexture1D.xml.
  6. .. _class_GradientTexture1D:
  7. GradientTexture1D
  8. =================
  9. **Inherits:** :ref:`Texture2D<class_Texture2D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A 1D texture that uses colors obtained from a :ref:`Gradient<class_Gradient>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A 1D texture that obtains colors from a :ref:`Gradient<class_Gradient>` to fill the texture data. The texture is filled by sampling the gradient for each pixel. Therefore, the texture does not necessarily represent an exact copy of the gradient, as it may miss some colors if there are not enough pixels. See also :ref:`GradientTexture2D<class_GradientTexture2D>`, :ref:`CurveTexture<class_CurveTexture>` and :ref:`CurveXYZTexture<class_CurveXYZTexture>`.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+
  21. | :ref:`Gradient<class_Gradient>` | :ref:`gradient<class_GradientTexture1D_property_gradient>` | |
  22. +---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+
  23. | :ref:`bool<class_bool>` | resource_local_to_scene | ``false`` (overrides :ref:`Resource<class_Resource_property_resource_local_to_scene>`) |
  24. +---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`use_hdr<class_GradientTexture1D_property_use_hdr>` | ``false`` |
  26. +---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+
  27. | :ref:`int<class_int>` | :ref:`width<class_GradientTexture1D_property_width>` | ``256`` |
  28. +---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+
  29. .. rst-class:: classref-section-separator
  30. ----
  31. .. rst-class:: classref-descriptions-group
  32. Property Descriptions
  33. ---------------------
  34. .. _class_GradientTexture1D_property_gradient:
  35. .. rst-class:: classref-property
  36. :ref:`Gradient<class_Gradient>` **gradient** :ref:`🔗<class_GradientTexture1D_property_gradient>`
  37. .. rst-class:: classref-property-setget
  38. - |void| **set_gradient**\ (\ value\: :ref:`Gradient<class_Gradient>`\ )
  39. - :ref:`Gradient<class_Gradient>` **get_gradient**\ (\ )
  40. The :ref:`Gradient<class_Gradient>` used to fill the texture.
  41. .. rst-class:: classref-item-separator
  42. ----
  43. .. _class_GradientTexture1D_property_use_hdr:
  44. .. rst-class:: classref-property
  45. :ref:`bool<class_bool>` **use_hdr** = ``false`` :ref:`🔗<class_GradientTexture1D_property_use_hdr>`
  46. .. rst-class:: classref-property-setget
  47. - |void| **set_use_hdr**\ (\ value\: :ref:`bool<class_bool>`\ )
  48. - :ref:`bool<class_bool>` **is_using_hdr**\ (\ )
  49. If ``true``, the generated texture will support high dynamic range (:ref:`Image.FORMAT_RGBAF<class_Image_constant_FORMAT_RGBAF>` format). This allows for glow effects to work if :ref:`Environment.glow_enabled<class_Environment_property_glow_enabled>` is ``true``. If ``false``, the generated texture will use low dynamic range; overbright colors will be clamped (:ref:`Image.FORMAT_RGBA8<class_Image_constant_FORMAT_RGBA8>` format).
  50. .. rst-class:: classref-item-separator
  51. ----
  52. .. _class_GradientTexture1D_property_width:
  53. .. rst-class:: classref-property
  54. :ref:`int<class_int>` **width** = ``256`` :ref:`🔗<class_GradientTexture1D_property_width>`
  55. .. rst-class:: classref-property-setget
  56. - |void| **set_width**\ (\ value\: :ref:`int<class_int>`\ )
  57. - :ref:`int<class_int>` **get_width**\ (\ )
  58. The number of color samples that will be obtained from the :ref:`Gradient<class_Gradient>`.
  59. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  60. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  61. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  62. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  63. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  64. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  65. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  66. .. |void| replace:: :abbr:`void (No return value.)`