Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
SVGTexture
Inherits: Texture2D < Texture < Resource < RefCounted < Object
A scalable Texture2D based on an SVG image.
Description
A scalable Texture2D based on an SVG image. SVGTextures are automatically re-rasterized to match font oversampling.
Properties
|
||
|
||
resource_local_to_scene |
|
|
|
Methods
create_from_string(source: String, scale: float = 1.0, saturation: float = 1.0, color_map: Dictionary = {}) static |
|
get_source() const |
|
void |
set_size_override(size: Vector2i) |
void |
set_source(source: String) |
Property Descriptions
SVG texture scale. 1.0
is the original SVG size. Higher values result in a larger image.
Dictionary color_map = {}
🔗
void set_color_map(value: Dictionary)
Dictionary get_color_map()
If set, remaps SVG texture colors according to Color-Color map.
Overrides texture saturation.
Method Descriptions
SVGTexture create_from_string(source: String, scale: float = 1.0, saturation: float = 1.0, color_map: Dictionary = {}) static 🔗
Creates a new SVGTexture and initializes it by allocating and setting the SVG data from string.
Returns SVG source code.
void set_size_override(size: Vector2i) 🔗
Resizes the texture to the specified dimensions.
void set_source(source: String) 🔗
Sets SVG source code.