godotengine/doc/classes/SVGTexture.xml
Pāvels Nadtočajevs 15cecfdac5
Add SVGTexture importer.
2025-04-24 08:15:53 +03:00

56 lines
2.2 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<class name="SVGTexture" inherits="Texture2D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A 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.
</description>
<tutorials>
</tutorials>
<methods>
<method name="create_from_string" qualifiers="static">
<return type="SVGTexture" />
<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.
</description>
</method>
<method name="get_source" qualifiers="const">
<return type="String" />
<description>
Returns SVG source code.
</description>
</method>
<method name="set_size_override">
<return type="void" />
<param index="0" name="size" type="Vector2i" />
<description>
Resizes the texture to the specified dimensions.
</description>
</method>
<method name="set_source">
<return type="void" />
<param index="0" name="source" type="String" />
<description>
Sets SVG source code.
</description>
</method>
</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.
</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.
</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">
Overrides texture saturation.
</member>
</members>
</class>