|
@@ -3,23 +3,25 @@
|
|
|
.. 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/SVGTexture.xml.
|
|
|
+.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/DPITexture.xml.
|
|
|
|
|
|
-.. _class_SVGTexture:
|
|
|
+.. _class_DPITexture:
|
|
|
|
|
|
-SVGTexture
|
|
|
+DPITexture
|
|
|
==========
|
|
|
|
|
|
+**Experimental:** This class may be changed or removed in future versions.
|
|
|
+
|
|
|
**Inherits:** :ref:`Texture2D<class_Texture2D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
|
|
-A scalable :ref:`Texture2D<class_Texture2D>` based on an SVG image.
|
|
|
+An automatically scalable :ref:`Texture2D<class_Texture2D>` based on an SVG image.
|
|
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
|
|
Description
|
|
|
-----------
|
|
|
|
|
|
-A scalable :ref:`Texture2D<class_Texture2D>` based on an SVG image. **SVGTexture**\ s are automatically re-rasterized to match font oversampling.
|
|
|
+An automatically scalable :ref:`Texture2D<class_Texture2D>` based on an SVG image. **DPITexture**\ s are used to automatically re-rasterize icons and other texture based UI theme elements to match viewport scale and font oversampling. See also :ref:`ProjectSettings.display/window/stretch/mode<class_ProjectSettings_property_display/window/stretch/mode>` ("canvas_items" mode) and :ref:`Viewport.oversampling_override<class_Viewport_property_oversampling_override>`.
|
|
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
|
@@ -30,13 +32,13 @@ Properties
|
|
|
:widths: auto
|
|
|
|
|
|
+-------------------------------------+---------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
|
- | :ref:`float<class_float>` | :ref:`base_scale<class_SVGTexture_property_base_scale>` | ``1.0`` |
|
|
|
+ | :ref:`float<class_float>` | :ref:`base_scale<class_DPITexture_property_base_scale>` | ``1.0`` |
|
|
|
+-------------------------------------+---------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
|
- | :ref:`Dictionary<class_Dictionary>` | :ref:`color_map<class_SVGTexture_property_color_map>` | ``{}`` |
|
|
|
+ | :ref:`Dictionary<class_Dictionary>` | :ref:`color_map<class_DPITexture_property_color_map>` | ``{}`` |
|
|
|
+-------------------------------------+---------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
|
| :ref:`bool<class_bool>` | resource_local_to_scene | ``false`` (overrides :ref:`Resource<class_Resource_property_resource_local_to_scene>`) |
|
|
|
+-------------------------------------+---------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
|
- | :ref:`float<class_float>` | :ref:`saturation<class_SVGTexture_property_saturation>` | ``1.0`` |
|
|
|
+ | :ref:`float<class_float>` | :ref:`saturation<class_DPITexture_property_saturation>` | ``1.0`` |
|
|
|
+-------------------------------------+---------------------------------------------------------+----------------------------------------------------------------------------------------+
|
|
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
@@ -48,15 +50,15 @@ Methods
|
|
|
:widths: auto
|
|
|
|
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`SVGTexture<class_SVGTexture>` | :ref:`create_from_string<class_SVGTexture_method_create_from_string>`\ (\ source\: :ref:`String<class_String>`, scale\: :ref:`float<class_float>` = 1.0, saturation\: :ref:`float<class_float>` = 1.0, color_map\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |static| |
|
|
|
+ | :ref:`DPITexture<class_DPITexture>` | :ref:`create_from_string<class_DPITexture_method_create_from_string>`\ (\ source\: :ref:`String<class_String>`, scale\: :ref:`float<class_float>` = 1.0, saturation\: :ref:`float<class_float>` = 1.0, color_map\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |static| |
|
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`RID<class_RID>` | :ref:`get_scaled_rid<class_SVGTexture_method_get_scaled_rid>`\ (\ ) |const| |
|
|
|
+ | :ref:`RID<class_RID>` | :ref:`get_scaled_rid<class_DPITexture_method_get_scaled_rid>`\ (\ ) |const| |
|
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`String<class_String>` | :ref:`get_source<class_SVGTexture_method_get_source>`\ (\ ) |const| |
|
|
|
+ | :ref:`String<class_String>` | :ref:`get_source<class_DPITexture_method_get_source>`\ (\ ) |const| |
|
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | |void| | :ref:`set_size_override<class_SVGTexture_method_set_size_override>`\ (\ size\: :ref:`Vector2i<class_Vector2i>`\ ) |
|
|
|
+ | |void| | :ref:`set_size_override<class_DPITexture_method_set_size_override>`\ (\ size\: :ref:`Vector2i<class_Vector2i>`\ ) |
|
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | |void| | :ref:`set_source<class_SVGTexture_method_set_source>`\ (\ source\: :ref:`String<class_String>`\ ) |
|
|
|
+ | |void| | :ref:`set_source<class_DPITexture_method_set_source>`\ (\ source\: :ref:`String<class_String>`\ ) |
|
|
|
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
|
|
.. rst-class:: classref-section-separator
|
|
@@ -68,45 +70,45 @@ Methods
|
|
|
Property Descriptions
|
|
|
---------------------
|
|
|
|
|
|
-.. _class_SVGTexture_property_base_scale:
|
|
|
+.. _class_DPITexture_property_base_scale:
|
|
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
|
|
-:ref:`float<class_float>` **base_scale** = ``1.0`` :ref:`🔗<class_SVGTexture_property_base_scale>`
|
|
|
+:ref:`float<class_float>` **base_scale** = ``1.0`` :ref:`🔗<class_DPITexture_property_base_scale>`
|
|
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
|
|
- |void| **set_base_scale**\ (\ value\: :ref:`float<class_float>`\ )
|
|
|
- :ref:`float<class_float>` **get_base_scale**\ (\ )
|
|
|
|
|
|
-SVG texture scale. ``1.0`` is the original SVG size. Higher values result in a larger image.
|
|
|
+Texture scale. ``1.0`` is the original SVG size. Higher values result in a larger image.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
----
|
|
|
|
|
|
-.. _class_SVGTexture_property_color_map:
|
|
|
+.. _class_DPITexture_property_color_map:
|
|
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
|
|
-:ref:`Dictionary<class_Dictionary>` **color_map** = ``{}`` :ref:`🔗<class_SVGTexture_property_color_map>`
|
|
|
+:ref:`Dictionary<class_Dictionary>` **color_map** = ``{}`` :ref:`🔗<class_DPITexture_property_color_map>`
|
|
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
|
|
- |void| **set_color_map**\ (\ value\: :ref:`Dictionary<class_Dictionary>`\ )
|
|
|
- :ref:`Dictionary<class_Dictionary>` **get_color_map**\ (\ )
|
|
|
|
|
|
-If set, remaps SVG texture colors according to :ref:`Color<class_Color>`-:ref:`Color<class_Color>` map.
|
|
|
+If set, remaps texture colors according to :ref:`Color<class_Color>`-:ref:`Color<class_Color>` map.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
----
|
|
|
|
|
|
-.. _class_SVGTexture_property_saturation:
|
|
|
+.. _class_DPITexture_property_saturation:
|
|
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
|
|
-:ref:`float<class_float>` **saturation** = ``1.0`` :ref:`🔗<class_SVGTexture_property_saturation>`
|
|
|
+:ref:`float<class_float>` **saturation** = ``1.0`` :ref:`🔗<class_DPITexture_property_saturation>`
|
|
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
|
@@ -124,23 +126,23 @@ Overrides texture saturation.
|
|
|
Method Descriptions
|
|
|
-------------------
|
|
|
|
|
|
-.. _class_SVGTexture_method_create_from_string:
|
|
|
+.. _class_DPITexture_method_create_from_string:
|
|
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|
|
-:ref:`SVGTexture<class_SVGTexture>` **create_from_string**\ (\ source\: :ref:`String<class_String>`, scale\: :ref:`float<class_float>` = 1.0, saturation\: :ref:`float<class_float>` = 1.0, color_map\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |static| :ref:`🔗<class_SVGTexture_method_create_from_string>`
|
|
|
+:ref:`DPITexture<class_DPITexture>` **create_from_string**\ (\ source\: :ref:`String<class_String>`, scale\: :ref:`float<class_float>` = 1.0, saturation\: :ref:`float<class_float>` = 1.0, color_map\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |static| :ref:`🔗<class_DPITexture_method_create_from_string>`
|
|
|
|
|
|
-Creates a new **SVGTexture** and initializes it by allocating and setting the SVG data from string.
|
|
|
+Creates a new **DPITexture** and initializes it by allocating and setting the SVG data from string.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
----
|
|
|
|
|
|
-.. _class_SVGTexture_method_get_scaled_rid:
|
|
|
+.. _class_DPITexture_method_get_scaled_rid:
|
|
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|
|
-:ref:`RID<class_RID>` **get_scaled_rid**\ (\ ) |const| :ref:`🔗<class_SVGTexture_method_get_scaled_rid>`
|
|
|
+:ref:`RID<class_RID>` **get_scaled_rid**\ (\ ) |const| :ref:`🔗<class_DPITexture_method_get_scaled_rid>`
|
|
|
|
|
|
Returns the :ref:`RID<class_RID>` of the texture rasterized to match the oversampling of the currently drawn canvas item.
|
|
|
|
|
@@ -148,11 +150,11 @@ Returns the :ref:`RID<class_RID>` of the texture rasterized to match the oversam
|
|
|
|
|
|
----
|
|
|
|
|
|
-.. _class_SVGTexture_method_get_source:
|
|
|
+.. _class_DPITexture_method_get_source:
|
|
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|
|
-:ref:`String<class_String>` **get_source**\ (\ ) |const| :ref:`🔗<class_SVGTexture_method_get_source>`
|
|
|
+:ref:`String<class_String>` **get_source**\ (\ ) |const| :ref:`🔗<class_DPITexture_method_get_source>`
|
|
|
|
|
|
Returns SVG source code.
|
|
|
|
|
@@ -160,11 +162,11 @@ Returns SVG source code.
|
|
|
|
|
|
----
|
|
|
|
|
|
-.. _class_SVGTexture_method_set_size_override:
|
|
|
+.. _class_DPITexture_method_set_size_override:
|
|
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|
|
-|void| **set_size_override**\ (\ size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_SVGTexture_method_set_size_override>`
|
|
|
+|void| **set_size_override**\ (\ size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_DPITexture_method_set_size_override>`
|
|
|
|
|
|
Resizes the texture to the specified dimensions.
|
|
|
|
|
@@ -172,11 +174,11 @@ Resizes the texture to the specified dimensions.
|
|
|
|
|
|
----
|
|
|
|
|
|
-.. _class_SVGTexture_method_set_source:
|
|
|
+.. _class_DPITexture_method_set_source:
|
|
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|
|
-|void| **set_source**\ (\ source\: :ref:`String<class_String>`\ ) :ref:`🔗<class_SVGTexture_method_set_source>`
|
|
|
+|void| **set_source**\ (\ source\: :ref:`String<class_String>`\ ) :ref:`🔗<class_DPITexture_method_set_source>`
|
|
|
|
|
|
Sets SVG source code.
|
|
|
|