Debian Codegraph @

doc/classes/DPITexture.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <class name="DPITexture" inherits="Texture2D" experimental="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 An automatically scalable [Texture2D] based on an SVG image.
5 </brief_description>
6 <description>
7 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].
8 </description>
9 <tutorials>
10 </tutorials>
11 <methods>
12 <method name="create_from_string" qualifiers="static">
13 <return type="DPITexture" />
14 <param index="0" name="source" type="String" />
15 <param index="1" name="scale" type="float" default="1.0" />
16 <param index="2" name="saturation" type="float" default="1.0" />
17 <param index="3" name="color_map" type="Dictionary" default="{}" />
18 <description>
19 Creates a new [DPITexture] and initializes it by allocating and setting the SVG data to [param source].
20 </description>
21 </method>
22 <method name="get_scaled_rid" qualifiers="const">
23 <return type="RID" />
24 <description>
25 Returns the [RID] of the texture rasterized to match the oversampling of the currently drawn canvas item.
26 </description>
27 </method>
28 <method name="get_source" qualifiers="const">
29 <return type="String" />
30 <description>
31 Returns this SVG texture's source code.
32 </description>
33 </method>
34 <method name="set_size_override">
35 <return type="void" />
36 <param index="0" name="size" type="Vector2i" />
37 <description>
38 Resizes the texture to the specified dimensions.
39 </description>
40 </method>
41 <method name="set_source">
42 <return type="void" />
43 <param index="0" name="source" type="String" />
44 <description>
45 Sets this SVG texture's source code.
46 </description>
47 </method>
48 </methods>
49 <members>
50 <member name="base_scale" type="float" setter="set_base_scale" getter="get_base_scale" default="1.0">
51 Texture scale. [code]1.0[/code] is the original SVG size. Higher values result in a larger image.
52 </member>
53 <member name="color_map" type="Dictionary" setter="set_color_map" getter="get_color_map" default="{}">
54 If set, remaps texture colors according to [Color]-[Color] map.
55 </member>
56 <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
57 <member name="saturation" type="float" setter="set_saturation" getter="get_saturation" default="1.0">
58 Overrides texture saturation.
59 </member>
60 </members>
61 </class>