From 0588ed74d6799f9ef5b150ca43e3ac7f52c55409 Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Sat, 23 Aug 2025 03:26:45 +0000 Subject: [PATCH] classref: Sync with current master branch (3defc85) --- classes/class_astar2d.rst | 2 +- classes/class_astar3d.rst | 2 +- classes/class_astargrid2d.rst | 2 +- classes/class_control.rst | 2 +- classes/class_displayserver.rst | 6 +- ...ss_svgtexture.rst => class_dpitexture.rst} | 66 ++++++++++--------- classes/class_editorexportplatform.rst | 4 +- classes/class_editorsettings.rst | 2 +- classes/class_projectsettings.rst | 4 +- classes/class_resourceimportersvg.rst | 8 +-- classes/class_texture2d.rst | 2 +- classes/class_viewport.rst | 18 ++++- classes/class_window.rst | 4 +- classes/index.rst | 2 +- 14 files changed, 71 insertions(+), 53 deletions(-) rename classes/{class_svgtexture.rst => class_dpitexture.rst} (78%) diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index aad2ca6a7..ecbe19af6 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -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`, 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` at a given time. Consider using :ref:`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. diff --git a/classes/class_astar3d.rst b/classes/class_astar3d.rst index 11b038f6b..e2d486e0a 100644 --- a/classes/class_astar3d.rst +++ b/classes/class_astar3d.rst @@ -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`, 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` at a given time. Consider using :ref:`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. diff --git a/classes/class_astargrid2d.rst b/classes/class_astargrid2d.rst index 8faf51d3c..9c74a63e6 100644 --- a/classes/class_astargrid2d.rst +++ b/classes/class_astargrid2d.rst @@ -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`, 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` at a given time. Consider using :ref:`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. diff --git a/classes/class_control.rst b/classes/class_control.rst index 916ff59c8..e4ca9c911 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -1134,7 +1134,7 @@ Right-to-left layout direction. :ref:`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` (:ref:`ProjectSettings.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` (:ref:`ProjectSettings.internationalization/rendering/text_driver`), left-to-right layout direction is always used regardless of the language. .. _class_Control_constant_LAYOUT_DIRECTION_MAX: diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index 44252bae0..5b4b5b478 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -808,7 +808,7 @@ The display server supports initiating window drag and resize operations on dema :ref:`Feature` **FEATURE_SCREEN_EXCLUDE_FROM_CAPTURE** = ``28`` -Display server supports :ref:`WINDOW_FLAG_EXCLUDE_FROM_CAPTURE` window flag. +Display server supports :ref:`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` **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()`, :ref:`screen_get_image_rect()`, and :ref:`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. diff --git a/classes/class_svgtexture.rst b/classes/class_dpitexture.rst similarity index 78% rename from classes/class_svgtexture.rst rename to classes/class_dpitexture.rst index 5a7cf3acb..8c688ab79 100644 --- a/classes/class_svgtexture.rst +++ b/classes/class_dpitexture.rst @@ -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` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A scalable :ref:`Texture2D` based on an SVG image. +An automatically scalable :ref:`Texture2D` based on an SVG image. .. rst-class:: classref-introduction-group Description ----------- -A scalable :ref:`Texture2D` based on an SVG image. **SVGTexture**\ s are automatically re-rasterized to match font oversampling. +An automatically scalable :ref:`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` ("canvas_items" mode) and :ref:`Viewport.oversampling_override`. .. rst-class:: classref-reftable-group @@ -30,13 +32,13 @@ Properties :widths: auto +-------------------------------------+---------------------------------------------------------+----------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`base_scale` | ``1.0`` | + | :ref:`float` | :ref:`base_scale` | ``1.0`` | +-------------------------------------+---------------------------------------------------------+----------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`color_map` | ``{}`` | + | :ref:`Dictionary` | :ref:`color_map` | ``{}`` | +-------------------------------------+---------------------------------------------------------+----------------------------------------------------------------------------------------+ | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | +-------------------------------------+---------------------------------------------------------+----------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`saturation` | ``1.0`` | + | :ref:`float` | :ref:`saturation` | ``1.0`` | +-------------------------------------+---------------------------------------------------------+----------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -48,15 +50,15 @@ Methods :widths: auto +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SVGTexture` | :ref:`create_from_string`\ (\ source\: :ref:`String`, scale\: :ref:`float` = 1.0, saturation\: :ref:`float` = 1.0, color_map\: :ref:`Dictionary` = {}\ ) |static| | + | :ref:`DPITexture` | :ref:`create_from_string`\ (\ source\: :ref:`String`, scale\: :ref:`float` = 1.0, saturation\: :ref:`float` = 1.0, color_map\: :ref:`Dictionary` = {}\ ) |static| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_scaled_rid`\ (\ ) |const| | + | :ref:`RID` | :ref:`get_scaled_rid`\ (\ ) |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_source`\ (\ ) |const| | + | :ref:`String` | :ref:`get_source`\ (\ ) |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_size_override`\ (\ size\: :ref:`Vector2i`\ ) | + | |void| | :ref:`set_size_override`\ (\ size\: :ref:`Vector2i`\ ) | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_source`\ (\ source\: :ref:`String`\ ) | + | |void| | :ref:`set_source`\ (\ source\: :ref:`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` **base_scale** = ``1.0`` :ref:`🔗` +:ref:`float` **base_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_base_scale**\ (\ value\: :ref:`float`\ ) - :ref:`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` **color_map** = ``{}`` :ref:`🔗` +:ref:`Dictionary` **color_map** = ``{}`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_color_map**\ (\ value\: :ref:`Dictionary`\ ) - :ref:`Dictionary` **get_color_map**\ (\ ) -If set, remaps SVG texture colors according to :ref:`Color`-:ref:`Color` map. +If set, remaps texture colors according to :ref:`Color`-:ref:`Color` map. .. rst-class:: classref-item-separator ---- -.. _class_SVGTexture_property_saturation: +.. _class_DPITexture_property_saturation: .. rst-class:: classref-property -:ref:`float` **saturation** = ``1.0`` :ref:`🔗` +:ref:`float` **saturation** = ``1.0`` :ref:`🔗` .. 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` **create_from_string**\ (\ source\: :ref:`String`, scale\: :ref:`float` = 1.0, saturation\: :ref:`float` = 1.0, color_map\: :ref:`Dictionary` = {}\ ) |static| :ref:`🔗` +:ref:`DPITexture` **create_from_string**\ (\ source\: :ref:`String`, scale\: :ref:`float` = 1.0, saturation\: :ref:`float` = 1.0, color_map\: :ref:`Dictionary` = {}\ ) |static| :ref:`🔗` -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` **get_scaled_rid**\ (\ ) |const| :ref:`🔗` +:ref:`RID` **get_scaled_rid**\ (\ ) |const| :ref:`🔗` Returns the :ref:`RID` of the texture rasterized to match the oversampling of the currently drawn canvas item. @@ -148,11 +150,11 @@ Returns the :ref:`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` **get_source**\ (\ ) |const| :ref:`🔗` +:ref:`String` **get_source**\ (\ ) |const| :ref:`🔗` 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`\ ) :ref:`🔗` +|void| **set_size_override**\ (\ size\: :ref:`Vector2i`\ ) :ref:`🔗` 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`\ ) :ref:`🔗` +|void| **set_source**\ (\ source\: :ref:`String`\ ) :ref:`🔗` Sets SVG source code. diff --git a/classes/class_editorexportplatform.rst b/classes/class_editorexportplatform.rst index e818a8096..ed17727ed 100644 --- a/classes/class_editorexportplatform.rst +++ b/classes/class_editorexportplatform.rst @@ -65,7 +65,7 @@ Methods +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_current_presets`\ (\ ) |const| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_forced_export_files`\ (\ preset\: :ref:`EditorExportPreset`\ ) |static| | + | :ref:`PackedStringArray` | :ref:`get_forced_export_files`\ (\ preset\: :ref:`EditorExportPreset` = null\ ) |static| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_internal_export_files`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -360,7 +360,7 @@ Returns array of :ref:`EditorExportPreset`\ s for this .. rst-class:: classref-method -:ref:`PackedStringArray` **get_forced_export_files**\ (\ preset\: :ref:`EditorExportPreset`\ ) |static| :ref:`🔗` +:ref:`PackedStringArray` **get_forced_export_files**\ (\ preset\: :ref:`EditorExportPreset` = null\ ) |static| :ref:`🔗` Returns array of core file names that always should be exported regardless of preset config. diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 6dabd076f..04171a8b5 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -6278,7 +6278,7 @@ The GDScript syntax highlighter text color for node reference literals (e.g. ``$ :ref:`Color` **text_editor/theme/highlighting/gdscript/string_name_color** :ref:`🔗` -The GDScript syntax highlighter text color for :ref:`StringName` literals (e.g. ``>"example"``). +The GDScript syntax highlighter text color for :ref:`StringName` literals (e.g. ``&"example"``). .. rst-class:: classref-item-separator diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index d3ea1235c..75bad4063 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -5454,7 +5454,7 @@ Maximum undo/redo history size for :ref:`TextEdit` fields. :ref:`bool` **gui/fonts/dynamic_fonts/use_oversampling** = ``true`` :ref:`🔗` -If set to ``true`` and :ref:`display/window/stretch/mode` is set to **"canvas_items"**, font and :ref:`SVGTexture` oversampling is enabled in the main window. Use :ref:`Viewport.oversampling` to control oversampling in other viewports and windows. +If set to ``true`` and :ref:`display/window/stretch/mode` is set to **"canvas_items"**, font and :ref:`DPITexture` oversampling is enabled in the main window. Use :ref:`Viewport.oversampling` to control oversampling in other viewports and windows. .. rst-class:: classref-item-separator @@ -13515,7 +13515,7 @@ The ratio of :ref:`WorkerThreadPool`'s threads that will :ref:`int` **threading/worker_pool/max_threads** = ``-1`` :ref:`🔗` -Maximum number of threads to be used by :ref:`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()`). +Maximum number of threads to be used by :ref:`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()`). .. rst-class:: classref-item-separator diff --git a/classes/class_resourceimportersvg.rst b/classes/class_resourceimportersvg.rst index f01396315..e14ec6f76 100644 --- a/classes/class_resourceimportersvg.rst +++ b/classes/class_resourceimportersvg.rst @@ -12,14 +12,14 @@ ResourceImporterSVG **Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`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` resources. See also :ref:`ResourceImporterTexture` and :ref:`ResourceImporterImage`. +This importer imports :ref:`DPITexture` resources. See also :ref:`ResourceImporterTexture` and :ref:`ResourceImporterImage`. .. rst-class:: classref-reftable-group @@ -54,7 +54,7 @@ Property Descriptions :ref:`float` **base_scale** = ``1.0`` :ref:`🔗` -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` **color_map** = ``{}`` :ref:`🔗` -If set, remaps SVG texture colors according to :ref:`Color`-:ref:`Color` map. +If set, remaps texture colors according to :ref:`Color`-:ref:`Color` map. .. rst-class:: classref-item-separator diff --git a/classes/class_texture2d.rst b/classes/class_texture2d.rst index d59d66b42..aab9244ba 100644 --- a/classes/class_texture2d.rst +++ b/classes/class_texture2d.rst @@ -12,7 +12,7 @@ Texture2D **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AnimatedTexture`, :ref:`AtlasTexture`, :ref:`CameraTexture`, :ref:`CanvasTexture`, :ref:`CompressedTexture2D`, :ref:`CurveTexture`, :ref:`CurveXYZTexture`, :ref:`ExternalTexture`, :ref:`GradientTexture1D`, :ref:`GradientTexture2D`, :ref:`ImageTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture2D`, :ref:`PlaceholderTexture2D`, :ref:`PortableCompressedTexture2D`, :ref:`SVGTexture`, :ref:`Texture2DRD`, :ref:`ViewportTexture` +**Inherited By:** :ref:`AnimatedTexture`, :ref:`AtlasTexture`, :ref:`CameraTexture`, :ref:`CanvasTexture`, :ref:`CompressedTexture2D`, :ref:`CurveTexture`, :ref:`CurveXYZTexture`, :ref:`DPITexture`, :ref:`ExternalTexture`, :ref:`GradientTexture1D`, :ref:`GradientTexture2D`, :ref:`ImageTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture2D`, :ref:`PlaceholderTexture2D`, :ref:`PortableCompressedTexture2D`, :ref:`Texture2DRD`, :ref:`ViewportTexture` Texture for 2D and 3D. diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index b03d6ba30..f4faf84c6 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -1560,7 +1560,7 @@ See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/msaa_3d`\ ) - :ref:`bool` **is_using_oversampling**\ (\ ) -If ``true`` and one of the following conditions is true: :ref:`SubViewport.size_2d_override_stretch` and :ref:`SubViewport.size_2d_override` are set, :ref:`Window.content_scale_factor` is set and scaling is enabled, :ref:`oversampling_override` is set, font and :ref:`SVGTexture` oversampling is enabled. +If ``true`` and one of the following conditions are true: :ref:`SubViewport.size_2d_override_stretch` and :ref:`SubViewport.size_2d_override` are set, :ref:`Window.content_scale_factor` is set and scaling is enabled, :ref:`oversampling_override` is set, font and :ref:`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()`. To make sure the texture you get is correct, you can await :ref:`RenderingServer.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.GetTexture().GetImage().SavePng("user://Screenshot.png"); + } + + + \ **Note:** When :ref:`use_hdr_2d` is ``true`` the returned texture will be an HDR image encoded in linear space. .. rst-class:: classref-item-separator diff --git a/classes/class_window.rst b/classes/class_window.rst index 66a016761..d3f51133c 100644 --- a/classes/class_window.rst +++ b/classes/class_window.rst @@ -679,7 +679,9 @@ Window style is overridden, forcing sharp corners. Windows is excluded from screenshots taken by :ref:`DisplayServer.screen_get_image()`, :ref:`DisplayServer.screen_get_image_rect()`, and :ref:`DisplayServer.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. diff --git a/classes/index.rst b/classes/index.rst index a68ccd950..8b93c8816 100644 --- a/classes/index.rst +++ b/classes/index.rst @@ -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