Rename SVGTexture to DPITexture.

This commit is contained in:
Pāvels Nadtočajevs
2025-08-20 20:46:38 +03:00
parent be0406946f
commit 10e11ec87f
13 changed files with 107 additions and 107 deletions

View File

@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SVGTexture" inherits="Texture2D" experimental="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<class name="DPITexture" inherits="Texture2D" experimental="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A scalable [Texture2D] based on an SVG image.
An automatically scalable [Texture2D] based on an SVG image.
</brief_description>
<description>
A scalable [Texture2D] based on an SVG image. [SVGTexture]s are automatically re-rasterized to match font oversampling.
An automatically scalable [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 [member ProjectSettings.display/window/stretch/mode] ("canvas_items" mode) and [member Viewport.oversampling_override].
</description>
<tutorials>
</tutorials>
<methods>
<method name="create_from_string" qualifiers="static">
<return type="SVGTexture" />
<return type="DPITexture" />
<param index="0" name="source" type="String" />
<param index="1" name="scale" type="float" default="1.0" />
<param index="2" name="saturation" type="float" default="1.0" />
<param index="3" name="color_map" type="Dictionary" default="{}" />
<description>
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.
</description>
</method>
<method name="get_scaled_rid" qualifiers="const">
@@ -48,10 +48,10 @@
</methods>
<members>
<member name="base_scale" type="float" setter="set_base_scale" getter="get_base_scale" default="1.0">
SVG texture scale. [code]1.0[/code] is the original SVG size. Higher values result in a larger image.
Texture scale. [code]1.0[/code] is the original SVG size. Higher values result in a larger image.
</member>
<member name="color_map" type="Dictionary" setter="set_color_map" getter="get_color_map" default="{}">
If set, remaps SVG texture colors according to [Color]-[Color] map.
If set, remaps texture colors according to [Color]-[Color] map.
</member>
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="saturation" type="float" setter="set_saturation" getter="get_saturation" default="1.0">

View File

@@ -1194,7 +1194,7 @@
Maximum undo/redo history size for [TextEdit] fields.
</member>
<member name="gui/fonts/dynamic_fonts/use_oversampling" type="bool" setter="" getter="" default="true">
If set to [code]true[/code] and [member display/window/stretch/mode] is set to [b]"canvas_items"[/b], font and [SVGTexture] oversampling is enabled in the main window. Use [member Viewport.oversampling] to control oversampling in other viewports and windows.
If set to [code]true[/code] and [member display/window/stretch/mode] is set to [b]"canvas_items"[/b], font and [DPITexture] oversampling is enabled in the main window. Use [member Viewport.oversampling] to control oversampling in other viewports and windows.
</member>
<member name="gui/theme/custom" type="String" setter="" getter="" default="&quot;&quot;">
Path to a custom [Theme] resource file to use for the project ([code].theme[/code] or generic [code].tres[/code]/[code].res[/code] extension).

View File

@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ResourceImporterSVG" inherits="ResourceImporter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
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.
</brief_description>
<description>
This importer imports [SVGTexture] resources. See also [ResourceImporterTexture] and [ResourceImporterImage].
This importer imports [DPITexture] resources. See also [ResourceImporterTexture] and [ResourceImporterImage].
</description>
<tutorials>
</tutorials>
<members>
<member name="base_scale" type="float" setter="" getter="" default="1.0">
SVG texture scale. [code]1.0[/code] is the original SVG size. Higher values result in a larger image.
Texture scale. [code]1.0[/code] is the original SVG size. Higher values result in a larger image.
</member>
<member name="color_map" type="Dictionary" setter="" getter="" default="{}">
If set, remaps SVG texture colors according to [Color]-[Color] map.
If set, remaps texture colors according to [Color]-[Color] map.
</member>
<member name="compress" type="bool" setter="" getter="" default="true">
If [code]true[/code], uses lossless compression for the SVG source.

View File

@@ -376,7 +376,7 @@
See also [member ProjectSettings.rendering/anti_aliasing/quality/msaa_3d] and [method RenderingServer.viewport_set_msaa_3d].
</member>
<member name="oversampling" type="bool" setter="set_use_oversampling" getter="is_using_oversampling" default="true">
If [code]true[/code] and one of the following conditions is true: [member SubViewport.size_2d_override_stretch] and [member SubViewport.size_2d_override] are set, [member Window.content_scale_factor] is set and scaling is enabled, [member oversampling_override] is set, font and [SVGTexture] oversampling is enabled.
If [code]true[/code] and one of the following conditions are true: [member SubViewport.size_2d_override_stretch] and [member SubViewport.size_2d_override] are set, [member Window.content_scale_factor] is set and scaling is enabled, [member oversampling_override] is set, font and [DPITexture] oversampling are enabled.
</member>
<member name="oversampling_override" type="float" setter="set_oversampling_override" getter="get_oversampling_override" default="0.0">
If greater than zero, this value is used as the font oversampling factor, otherwise oversampling is equal to viewport scale.