12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- :github_url: hide
- .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the GradientTexture.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_GradientTexture:
- GradientTexture
- ===============
- **Inherits:** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
- Gradient-filled texture.
- Description
- -----------
- GradientTexture uses a :ref:`Gradient<class_Gradient>` to fill the texture data. The gradient will be filled from left to right using colors obtained from the gradient. This means the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see :ref:`width<class_GradientTexture_property_width>`). See also :ref:`CurveTexture<class_CurveTexture>`.
- Properties
- ----------
- +---------------------------------+----------------------------------------------------------+----------+
- | :ref:`Gradient<class_Gradient>` | :ref:`gradient<class_GradientTexture_property_gradient>` | |
- +---------------------------------+----------------------------------------------------------+----------+
- | :ref:`int<class_int>` | :ref:`width<class_GradientTexture_property_width>` | ``2048`` |
- +---------------------------------+----------------------------------------------------------+----------+
- Property Descriptions
- ---------------------
- .. _class_GradientTexture_property_gradient:
- - :ref:`Gradient<class_Gradient>` **gradient**
- +----------+---------------------+
- | *Setter* | set_gradient(value) |
- +----------+---------------------+
- | *Getter* | get_gradient() |
- +----------+---------------------+
- The :ref:`Gradient<class_Gradient>` that will be used to fill the texture.
- ----
- .. _class_GradientTexture_property_width:
- - :ref:`int<class_int>` **width**
- +-----------+------------------+
- | *Default* | ``2048`` |
- +-----------+------------------+
- | *Setter* | set_width(value) |
- +-----------+------------------+
- | *Getter* | 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.)`
|