123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/GradientTexture1D.xml.
- .. _class_GradientTexture1D:
- GradientTexture1D
- =================
- **Inherits:** :ref:`Texture2D<class_Texture2D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
- A 1D texture that uses colors obtained from a :ref:`Gradient<class_Gradient>`.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- 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>`.
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. table::
- :widths: auto
- +---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+
- | :ref:`Gradient<class_Gradient>` | :ref:`gradient<class_GradientTexture1D_property_gradient>` | |
- +---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | resource_local_to_scene | ``false`` (overrides :ref:`Resource<class_Resource_property_resource_local_to_scene>`) |
- +---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`use_hdr<class_GradientTexture1D_property_use_hdr>` | ``false`` |
- +---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`width<class_GradientTexture1D_property_width>` | ``256`` |
- +---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _class_GradientTexture1D_property_gradient:
- .. rst-class:: classref-property
- :ref:`Gradient<class_Gradient>` **gradient** :ref:`🔗<class_GradientTexture1D_property_gradient>`
- .. rst-class:: classref-property-setget
- - |void| **set_gradient**\ (\ value\: :ref:`Gradient<class_Gradient>`\ )
- - :ref:`Gradient<class_Gradient>` **get_gradient**\ (\ )
- The :ref:`Gradient<class_Gradient>` used to fill the texture.
- .. rst-class:: classref-item-separator
- ----
- .. _class_GradientTexture1D_property_use_hdr:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **use_hdr** = ``false`` :ref:`🔗<class_GradientTexture1D_property_use_hdr>`
- .. rst-class:: classref-property-setget
- - |void| **set_use_hdr**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_using_hdr**\ (\ )
- 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).
- .. rst-class:: classref-item-separator
- ----
- .. _class_GradientTexture1D_property_width:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **width** = ``256`` :ref:`🔗<class_GradientTexture1D_property_width>`
- .. rst-class:: classref-property-setget
- - |void| **set_width**\ (\ value\: :ref:`int<class_int>`\ )
- - :ref:`int<class_int>` **get_width**\ (\ )
- The number of color samples that will be obtained from the :ref:`Gradient<class_Gradient>`.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
- .. |void| replace:: :abbr:`void (No return value.)`
|