mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
classref: Sync with current master branch (2e7fc81)
This commit is contained in:
@@ -49,25 +49,25 @@ Methods
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_point<class_Gradient_method_add_point>` **(** :ref:`float<class_float>` offset, :ref:`Color<class_Color>` color **)** |
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_Color>` | :ref:`get_color<class_Gradient_method_get_color>` **(** :ref:`int<class_int>` point **)** |
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_offset<class_Gradient_method_get_offset>` **(** :ref:`int<class_int>` point **)** |
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_point_count<class_Gradient_method_get_point_count>` **(** **)** |const| |
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_point<class_Gradient_method_remove_point>` **(** :ref:`int<class_int>` point **)** |
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`reverse<class_Gradient_method_reverse>` **(** **)** |
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_Color>` | :ref:`sample<class_Gradient_method_sample>` **(** :ref:`float<class_float>` offset **)** |
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_color<class_Gradient_method_set_color>` **(** :ref:`int<class_int>` point, :ref:`Color<class_Color>` color **)** |
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_offset<class_Gradient_method_set_offset>` **(** :ref:`int<class_int>` point, :ref:`float<class_float>` offset **)** |
|
||||
+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+
|
||||
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`add_point<class_Gradient_method_add_point>`\ (\ offset\: :ref:`float<class_float>`, color\: :ref:`Color<class_Color>`\ ) |
|
||||
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_Color>` | :ref:`get_color<class_Gradient_method_get_color>`\ (\ point\: :ref:`int<class_int>`\ ) |
|
||||
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_offset<class_Gradient_method_get_offset>`\ (\ point\: :ref:`int<class_int>`\ ) |
|
||||
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_point_count<class_Gradient_method_get_point_count>`\ (\ ) |const| |
|
||||
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`remove_point<class_Gradient_method_remove_point>`\ (\ point\: :ref:`int<class_int>`\ ) |
|
||||
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`reverse<class_Gradient_method_reverse>`\ (\ ) |
|
||||
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_Color>` | :ref:`sample<class_Gradient_method_sample>`\ (\ offset\: :ref:`float<class_float>`\ ) |
|
||||
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_color<class_Gradient_method_set_color>`\ (\ point\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |
|
||||
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_offset<class_Gradient_method_set_offset>`\ (\ point\: :ref:`int<class_int>`, offset\: :ref:`float<class_float>`\ ) |
|
||||
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -159,8 +159,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_colors** **(** :ref:`PackedColorArray<class_PackedColorArray>` value **)**
|
||||
- :ref:`PackedColorArray<class_PackedColorArray>` **get_colors** **(** **)**
|
||||
- |void| **set_colors**\ (\ value\: :ref:`PackedColorArray<class_PackedColorArray>`\ )
|
||||
- :ref:`PackedColorArray<class_PackedColorArray>` **get_colors**\ (\ )
|
||||
|
||||
Gradient's colors returned as a :ref:`PackedColorArray<class_PackedColorArray>`.
|
||||
|
||||
@@ -178,8 +178,8 @@ Gradient's colors returned as a :ref:`PackedColorArray<class_PackedColorArray>`.
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_interpolation_color_space** **(** :ref:`ColorSpace<enum_Gradient_ColorSpace>` value **)**
|
||||
- :ref:`ColorSpace<enum_Gradient_ColorSpace>` **get_interpolation_color_space** **(** **)**
|
||||
- |void| **set_interpolation_color_space**\ (\ value\: :ref:`ColorSpace<enum_Gradient_ColorSpace>`\ )
|
||||
- :ref:`ColorSpace<enum_Gradient_ColorSpace>` **get_interpolation_color_space**\ (\ )
|
||||
|
||||
The color space used to interpolate between points of the gradient. It does not affect the returned colors, which will always be in sRGB space. See :ref:`ColorSpace<enum_Gradient_ColorSpace>` for available modes.
|
||||
|
||||
@@ -197,8 +197,8 @@ The color space used to interpolate between points of the gradient. It does not
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_interpolation_mode** **(** :ref:`InterpolationMode<enum_Gradient_InterpolationMode>` value **)**
|
||||
- :ref:`InterpolationMode<enum_Gradient_InterpolationMode>` **get_interpolation_mode** **(** **)**
|
||||
- |void| **set_interpolation_mode**\ (\ value\: :ref:`InterpolationMode<enum_Gradient_InterpolationMode>`\ )
|
||||
- :ref:`InterpolationMode<enum_Gradient_InterpolationMode>` **get_interpolation_mode**\ (\ )
|
||||
|
||||
The algorithm used to interpolate between points of the gradient. See :ref:`InterpolationMode<enum_Gradient_InterpolationMode>` for available modes.
|
||||
|
||||
@@ -214,8 +214,8 @@ The algorithm used to interpolate between points of the gradient. See :ref:`Inte
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_offsets** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` value **)**
|
||||
- :ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_offsets** **(** **)**
|
||||
- |void| **set_offsets**\ (\ value\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ )
|
||||
- :ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_offsets**\ (\ )
|
||||
|
||||
Gradient's offsets returned as a :ref:`PackedFloat32Array<class_PackedFloat32Array>`.
|
||||
|
||||
@@ -234,7 +234,7 @@ Method Descriptions
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **add_point** **(** :ref:`float<class_float>` offset, :ref:`Color<class_Color>` color **)**
|
||||
|void| **add_point**\ (\ offset\: :ref:`float<class_float>`, color\: :ref:`Color<class_Color>`\ )
|
||||
|
||||
Adds the specified color to the gradient, with the specified offset.
|
||||
|
||||
@@ -246,7 +246,7 @@ Adds the specified color to the gradient, with the specified offset.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Color<class_Color>` **get_color** **(** :ref:`int<class_int>` point **)**
|
||||
:ref:`Color<class_Color>` **get_color**\ (\ point\: :ref:`int<class_int>`\ )
|
||||
|
||||
Returns the color of the gradient color at index ``point``.
|
||||
|
||||
@@ -258,7 +258,7 @@ Returns the color of the gradient color at index ``point``.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **get_offset** **(** :ref:`int<class_int>` point **)**
|
||||
:ref:`float<class_float>` **get_offset**\ (\ point\: :ref:`int<class_int>`\ )
|
||||
|
||||
Returns the offset of the gradient color at index ``point``.
|
||||
|
||||
@@ -270,7 +270,7 @@ Returns the offset of the gradient color at index ``point``.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **get_point_count** **(** **)** |const|
|
||||
:ref:`int<class_int>` **get_point_count**\ (\ ) |const|
|
||||
|
||||
Returns the number of colors in the gradient.
|
||||
|
||||
@@ -282,7 +282,7 @@ Returns the number of colors in the gradient.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **remove_point** **(** :ref:`int<class_int>` point **)**
|
||||
|void| **remove_point**\ (\ point\: :ref:`int<class_int>`\ )
|
||||
|
||||
Removes the color at index ``point``.
|
||||
|
||||
@@ -294,7 +294,7 @@ Removes the color at index ``point``.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **reverse** **(** **)**
|
||||
|void| **reverse**\ (\ )
|
||||
|
||||
Reverses/mirrors the gradient.
|
||||
|
||||
@@ -308,7 +308,7 @@ Reverses/mirrors the gradient.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Color<class_Color>` **sample** **(** :ref:`float<class_float>` offset **)**
|
||||
:ref:`Color<class_Color>` **sample**\ (\ offset\: :ref:`float<class_float>`\ )
|
||||
|
||||
Returns the interpolated color specified by ``offset``.
|
||||
|
||||
@@ -320,7 +320,7 @@ Returns the interpolated color specified by ``offset``.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_color** **(** :ref:`int<class_int>` point, :ref:`Color<class_Color>` color **)**
|
||||
|void| **set_color**\ (\ point\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ )
|
||||
|
||||
Sets the color of the gradient color at index ``point``.
|
||||
|
||||
@@ -332,7 +332,7 @@ Sets the color of the gradient color at index ``point``.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_offset** **(** :ref:`int<class_int>` point, :ref:`float<class_float>` offset **)**
|
||||
|void| **set_offset**\ (\ point\: :ref:`int<class_int>`, offset\: :ref:`float<class_float>`\ )
|
||||
|
||||
Sets the offset for the gradient color at index ``point``.
|
||||
|
||||
@@ -343,3 +343,4 @@ Sets the offset for the gradient color at index ``point``.
|
||||
.. |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.)`
|
||||
|
||||
Reference in New Issue
Block a user