Merge pull request #105655 from bruvzg/svg_tx_import
Add `SVGTexture` importer.
This commit is contained in:
25
doc/classes/ResourceImporterSVG.xml
Normal file
25
doc/classes/ResourceImporterSVG.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?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 a SVG file as a scalable texture for use in 2D or 3D rendering.
|
||||
</brief_description>
|
||||
<description>
|
||||
This importer imports [SVGTexture] 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.
|
||||
</member>
|
||||
<member name="color_map" type="Dictionary" setter="" getter="" default="{}">
|
||||
If set, remaps SVG 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.
|
||||
</member>
|
||||
<member name="saturation" type="float" setter="" getter="" default="1.0">
|
||||
Overrides texture saturation.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
@ -19,6 +19,12 @@
|
||||
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" />
|
||||
@ -26,6 +32,13 @@
|
||||
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">
|
||||
@ -38,8 +51,5 @@
|
||||
<member name="saturation" type="float" setter="set_saturation" getter="get_saturation" default="1.0">
|
||||
Overrides texture saturation.
|
||||
</member>
|
||||
<member name="source" type="String" setter="set_source" getter="get_source" default="""">
|
||||
SVG source code.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
||||
Reference in New Issue
Block a user