classref: Sync with current master branch (3defc85)

This commit is contained in:
Godot Organization
2025-08-23 03:26:45 +00:00
parent a1632ef08e
commit 0588ed74d6
14 changed files with 71 additions and 53 deletions

View File

@@ -477,7 +477,7 @@ Returns an array with the points that are in the path found by AStar2D between t
If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached.
\ **Note:** This method is not thread-safe. If called from a :ref:`Thread<class_Thread>`, it will return an empty array and will print an error message.
\ **Note:** This method is not thread-safe; it can only be used from a single :ref:`Thread<class_Thread>` at a given time. Consider using :ref:`Mutex<class_Mutex>` to ensure exclusive access to one thread to avoid race conditions.
Additionally, when ``allow_partial_path`` is ``true`` and ``to_id`` is disabled the search may take an unusually long time to finish.

View File

@@ -519,7 +519,7 @@ Returns an array with the points that are in the path found by AStar3D between t
If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached.
\ **Note:** This method is not thread-safe. If called from a :ref:`Thread<class_Thread>`, it will return an empty array and will print an error message.
\ **Note:** This method is not thread-safe; it can only be used from a single :ref:`Thread<class_Thread>` at a given time. Consider using :ref:`Mutex<class_Mutex>` to ensure exclusive access to one thread to avoid race conditions.
Additionally, when ``allow_partial_path`` is ``true`` and ``to_id`` is disabled the search may take an unusually long time to finish.

View File

@@ -580,7 +580,7 @@ Returns an array with the points that are in the path found by **AStarGrid2D** b
If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached.
\ **Note:** This method is not thread-safe. If called from a :ref:`Thread<class_Thread>`, it will return an empty array and will print an error message.
\ **Note:** This method is not thread-safe; it can only be used from a single :ref:`Thread<class_Thread>` at a given time. Consider using :ref:`Mutex<class_Mutex>` to ensure exclusive access to one thread to avoid race conditions.
Additionally, when ``allow_partial_path`` is ``true`` and ``to_id`` is solid the search may take an unusually long time to finish.

View File

@@ -1134,7 +1134,7 @@ Right-to-left layout direction.
:ref:`LayoutDirection<enum_Control_LayoutDirection>` **LAYOUT_DIRECTION_SYSTEM_LOCALE** = ``4``
Automatic layout direction, determined from the system locale. Right-to-left layout direction is automatically used for languages that require it such as Arabic and Hebrew, but only if a valid translation file is loaded for the given language.. For all other languages (or if no valid translation file is found by Godot), left-to-right layout direction is used. If using :ref:`TextServerFallback<class_TextServerFallback>` (:ref:`ProjectSettings.internationalization/rendering/text_driver<class_ProjectSettings_property_internationalization/rendering/text_driver>`), left-to-right layout direction is always used regardless of the language.
Automatic layout direction, determined from the system locale. Right-to-left layout direction is automatically used for languages that require it such as Arabic and Hebrew, but only if a valid translation file is loaded for the given language. For all other languages (or if no valid translation file is found by Godot), left-to-right layout direction is used. If using :ref:`TextServerFallback<class_TextServerFallback>` (:ref:`ProjectSettings.internationalization/rendering/text_driver<class_ProjectSettings_property_internationalization/rendering/text_driver>`), left-to-right layout direction is always used regardless of the language.
.. _class_Control_constant_LAYOUT_DIRECTION_MAX:

View File

@@ -808,7 +808,7 @@ The display server supports initiating window drag and resize operations on dema
:ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_SCREEN_EXCLUDE_FROM_CAPTURE** = ``28``
Display server supports :ref:`WINDOW_FLAG_EXCLUDE_FROM_CAPTURE<class_DisplayServer_constant_WINDOW_FLAG_EXCLUDE_FROM_CAPTURE>` window flag.
Display server supports :ref:`WINDOW_FLAG_EXCLUDE_FROM_CAPTURE<class_DisplayServer_constant_WINDOW_FLAG_EXCLUDE_FROM_CAPTURE>` window flag. **Windows, macOS**
.. _class_DisplayServer_constant_FEATURE_WINDOW_EMBEDDING:
@@ -816,7 +816,7 @@ Display server supports :ref:`WINDOW_FLAG_EXCLUDE_FROM_CAPTURE<class_DisplayServ
:ref:`Feature<enum_DisplayServer_Feature>` **FEATURE_WINDOW_EMBEDDING** = ``29``
Display server supports embedding a window from another process. **Windows, Linux (X11)**
Display server supports embedding a window from another process. **Windows, Linux (X11), macOS**
.. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE_MIME:
@@ -2272,7 +2272,7 @@ Window style is overridden, forcing sharp corners.
Window is excluded from screenshots taken by :ref:`screen_get_image()<class_DisplayServer_method_screen_get_image>`, :ref:`screen_get_image_rect()<class_DisplayServer_method_screen_get_image_rect>`, and :ref:`screen_get_pixel()<class_DisplayServer_method_screen_get_pixel>`.
\ **Note:** This flag is implemented on macOS and Windows.
\ **Note:** This flag is implemented on macOS and Windows (10, 20H1).
\ **Note:** Setting this flag will prevent standard screenshot methods from capturing a window image, but does **NOT** guarantee that other apps won't be able to capture an image. It should not be used as a DRM or security measure.

View File

@@ -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.

View File

@@ -65,7 +65,7 @@ Methods
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`get_current_presets<class_EditorExportPlatform_method_get_current_presets>`\ (\ ) |const| |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_forced_export_files<class_EditorExportPlatform_method_get_forced_export_files>`\ (\ preset\: :ref:`EditorExportPreset<class_EditorExportPreset>`\ ) |static| |
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_forced_export_files<class_EditorExportPlatform_method_get_forced_export_files>`\ (\ preset\: :ref:`EditorExportPreset<class_EditorExportPreset>` = null\ ) |static| |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Dictionary<class_Dictionary>` | :ref:`get_internal_export_files<class_EditorExportPlatform_method_get_internal_export_files>`\ (\ preset\: :ref:`EditorExportPreset<class_EditorExportPreset>`, debug\: :ref:`bool<class_bool>`\ ) |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -360,7 +360,7 @@ Returns array of :ref:`EditorExportPreset<class_EditorExportPreset>`\ s for this
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_forced_export_files**\ (\ preset\: :ref:`EditorExportPreset<class_EditorExportPreset>`\ ) |static| :ref:`🔗<class_EditorExportPlatform_method_get_forced_export_files>`
:ref:`PackedStringArray<class_PackedStringArray>` **get_forced_export_files**\ (\ preset\: :ref:`EditorExportPreset<class_EditorExportPreset>` = null\ ) |static| :ref:`🔗<class_EditorExportPlatform_method_get_forced_export_files>`
Returns array of core file names that always should be exported regardless of preset config.

View File

@@ -6278,7 +6278,7 @@ The GDScript syntax highlighter text color for node reference literals (e.g. ``$
:ref:`Color<class_Color>` **text_editor/theme/highlighting/gdscript/string_name_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/gdscript/string_name_color>`
The GDScript syntax highlighter text color for :ref:`StringName<class_StringName>` literals (e.g. ``>"example"``).
The GDScript syntax highlighter text color for :ref:`StringName<class_StringName>` literals (e.g. ``&"example"``).
.. rst-class:: classref-item-separator

View File

@@ -5454,7 +5454,7 @@ Maximum undo/redo history size for :ref:`TextEdit<class_TextEdit>` fields.
:ref:`bool<class_bool>` **gui/fonts/dynamic_fonts/use_oversampling** = ``true`` :ref:`🔗<class_ProjectSettings_property_gui/fonts/dynamic_fonts/use_oversampling>`
If set to ``true`` and :ref:`display/window/stretch/mode<class_ProjectSettings_property_display/window/stretch/mode>` is set to **"canvas_items"**, font and :ref:`SVGTexture<class_SVGTexture>` oversampling is enabled in the main window. Use :ref:`Viewport.oversampling<class_Viewport_property_oversampling>` to control oversampling in other viewports and windows.
If set to ``true`` and :ref:`display/window/stretch/mode<class_ProjectSettings_property_display/window/stretch/mode>` is set to **"canvas_items"**, font and :ref:`DPITexture<class_DPITexture>` oversampling is enabled in the main window. Use :ref:`Viewport.oversampling<class_Viewport_property_oversampling>` to control oversampling in other viewports and windows.
.. rst-class:: classref-item-separator
@@ -13515,7 +13515,7 @@ The ratio of :ref:`WorkerThreadPool<class_WorkerThreadPool>`'s threads that will
:ref:`int<class_int>` **threading/worker_pool/max_threads** = ``-1`` :ref:`🔗<class_ProjectSettings_property_threading/worker_pool/max_threads>`
Maximum number of threads to be used by :ref:`WorkerThreadPool<class_WorkerThreadPool>`. Value of ``-1`` means ``1`` on Web, or a number of *logical* CPU cores available on other platforms (see :ref:`OS.get_processor_count()<class_OS_method_get_processor_count>`).
Maximum number of threads to be used by :ref:`WorkerThreadPool<class_WorkerThreadPool>`. Value of ``0`` or less means ``1`` on Web, or a number of *logical* CPU cores available on other platforms (see :ref:`OS.get_processor_count()<class_OS_method_get_processor_count>`).
.. rst-class:: classref-item-separator

View File

@@ -12,14 +12,14 @@ ResourceImporterSVG
**Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Imports an SVG file as a scalable texture for use in 2D or 3D rendering.
Imports an SVG file as an automatically scalable texture for use in UI elements and 2D rendering.
.. rst-class:: classref-introduction-group
Description
-----------
This importer imports :ref:`SVGTexture<class_SVGTexture>` resources. See also :ref:`ResourceImporterTexture<class_ResourceImporterTexture>` and :ref:`ResourceImporterImage<class_ResourceImporterImage>`.
This importer imports :ref:`DPITexture<class_DPITexture>` resources. See also :ref:`ResourceImporterTexture<class_ResourceImporterTexture>` and :ref:`ResourceImporterImage<class_ResourceImporterImage>`.
.. rst-class:: classref-reftable-group
@@ -54,7 +54,7 @@ Property Descriptions
:ref:`float<class_float>` **base_scale** = ``1.0`` :ref:`🔗<class_ResourceImporterSVG_property_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
@@ -66,7 +66,7 @@ SVG texture scale. ``1.0`` is the original SVG size. Higher values result in a l
:ref:`Dictionary<class_Dictionary>` **color_map** = ``{}`` :ref:`🔗<class_ResourceImporterSVG_property_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

View File

@@ -12,7 +12,7 @@ Texture2D
**Inherits:** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
**Inherited By:** :ref:`AnimatedTexture<class_AnimatedTexture>`, :ref:`AtlasTexture<class_AtlasTexture>`, :ref:`CameraTexture<class_CameraTexture>`, :ref:`CanvasTexture<class_CanvasTexture>`, :ref:`CompressedTexture2D<class_CompressedTexture2D>`, :ref:`CurveTexture<class_CurveTexture>`, :ref:`CurveXYZTexture<class_CurveXYZTexture>`, :ref:`ExternalTexture<class_ExternalTexture>`, :ref:`GradientTexture1D<class_GradientTexture1D>`, :ref:`GradientTexture2D<class_GradientTexture2D>`, :ref:`ImageTexture<class_ImageTexture>`, :ref:`MeshTexture<class_MeshTexture>`, :ref:`NoiseTexture2D<class_NoiseTexture2D>`, :ref:`PlaceholderTexture2D<class_PlaceholderTexture2D>`, :ref:`PortableCompressedTexture2D<class_PortableCompressedTexture2D>`, :ref:`SVGTexture<class_SVGTexture>`, :ref:`Texture2DRD<class_Texture2DRD>`, :ref:`ViewportTexture<class_ViewportTexture>`
**Inherited By:** :ref:`AnimatedTexture<class_AnimatedTexture>`, :ref:`AtlasTexture<class_AtlasTexture>`, :ref:`CameraTexture<class_CameraTexture>`, :ref:`CanvasTexture<class_CanvasTexture>`, :ref:`CompressedTexture2D<class_CompressedTexture2D>`, :ref:`CurveTexture<class_CurveTexture>`, :ref:`CurveXYZTexture<class_CurveXYZTexture>`, :ref:`DPITexture<class_DPITexture>`, :ref:`ExternalTexture<class_ExternalTexture>`, :ref:`GradientTexture1D<class_GradientTexture1D>`, :ref:`GradientTexture2D<class_GradientTexture2D>`, :ref:`ImageTexture<class_ImageTexture>`, :ref:`MeshTexture<class_MeshTexture>`, :ref:`NoiseTexture2D<class_NoiseTexture2D>`, :ref:`PlaceholderTexture2D<class_PlaceholderTexture2D>`, :ref:`PortableCompressedTexture2D<class_PortableCompressedTexture2D>`, :ref:`Texture2DRD<class_Texture2DRD>`, :ref:`ViewportTexture<class_ViewportTexture>`
Texture for 2D and 3D.

View File

@@ -1560,7 +1560,7 @@ See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/msaa_3d<class_Pro
- |void| **set_use_oversampling**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_using_oversampling**\ (\ )
If ``true`` and one of the following conditions is true: :ref:`SubViewport.size_2d_override_stretch<class_SubViewport_property_size_2d_override_stretch>` and :ref:`SubViewport.size_2d_override<class_SubViewport_property_size_2d_override>` are set, :ref:`Window.content_scale_factor<class_Window_property_content_scale_factor>` is set and scaling is enabled, :ref:`oversampling_override<class_Viewport_property_oversampling_override>` is set, font and :ref:`SVGTexture<class_SVGTexture>` oversampling is enabled.
If ``true`` and one of the following conditions are true: :ref:`SubViewport.size_2d_override_stretch<class_SubViewport_property_size_2d_override_stretch>` and :ref:`SubViewport.size_2d_override<class_SubViewport_property_size_2d_override>` are set, :ref:`Window.content_scale_factor<class_Window_property_content_scale_factor>` is set and scaling is enabled, :ref:`oversampling_override<class_Viewport_property_oversampling_override>` is set, font and :ref:`DPITexture<class_DPITexture>` oversampling are enabled.
.. rst-class:: classref-item-separator
@@ -2330,12 +2330,26 @@ Returns the viewport's texture.
\ **Note:** When trying to store the current texture (e.g. in a file), it might be completely black or outdated if used too early, especially when used in e.g. :ref:`Node._ready()<class_Node_private_method__ready>`. To make sure the texture you get is correct, you can await :ref:`RenderingServer.frame_post_draw<class_RenderingServer_signal_frame_post_draw>` signal.
::
.. tabs::
.. code-tab:: gdscript
func _ready():
await RenderingServer.frame_post_draw
$Viewport.get_texture().get_image().save_png("user://Screenshot.png")
.. code-tab:: csharp
public async override void _Ready()
{
await ToSignal(RenderingServer.Singleton, RenderingServer.SignalName.FramePostDraw);
var viewport = GetNode<Viewport>("Viewport");
viewport.GetTexture().GetImage().SavePng("user://Screenshot.png");
}
\ **Note:** When :ref:`use_hdr_2d<class_Viewport_property_use_hdr_2d>` is ``true`` the returned texture will be an HDR image encoded in linear space.
.. rst-class:: classref-item-separator

View File

@@ -679,7 +679,9 @@ Window style is overridden, forcing sharp corners.
Windows is excluded from screenshots taken by :ref:`DisplayServer.screen_get_image()<class_DisplayServer_method_screen_get_image>`, :ref:`DisplayServer.screen_get_image_rect()<class_DisplayServer_method_screen_get_image_rect>`, and :ref:`DisplayServer.screen_get_pixel()<class_DisplayServer_method_screen_get_pixel>`.
\ **Note:** This flag is implemented on macOS and Windows.
\ **Note:** This flag has no effect in embedded windows.
\ **Note:** This flag is implemented on macOS and Windows (10, 20H1).
\ **Note:** Setting this flag will prevent standard screenshot methods from capturing a window image, but does **NOT** guarantee that other apps won't be able to capture an image. It should not be used as a DRM or security measure.

View File

@@ -416,6 +416,7 @@ Resources
class_curvexyztexture
class_cylindermesh
class_cylindershape3d
class_dpitexture
class_editornode3dgizmoplugin
class_editorsettings
class_editorsyntaxhighlighter
@@ -574,7 +575,6 @@ Resources
class_styleboxflat
class_styleboxline
class_styleboxtexture
class_svgtexture
class_syntaxhighlighter
class_systemfont
class_textmesh