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...
ResourceImporterSVG
Eredita: ResourceImporter < RefCounted < Object
Importa un file SVG come texture automaticamente ridimensionabile da usare per gli elementi dell'UI e per il rendering 2D.
Descrizione
Questo importatore importa risorse DPITexture. Vedi anche ResourceImporterTexture e ResourceImporterImage.
Proprietà
|
||
|
||
|
||
|
||
|
||
|
Descrizioni delle proprietà
Scala della texture. 1.0 è la dimensione originale dell'SVG. Valori più alti risultano in un'immagine più grande.
Dictionary color_map = {} 🔗
Se impostato, rimappa i colori della texture in base alla mappa Color-Color.
Se true, utilizza la compressione senza perdita di dati per la sorgente SVG.
bool fix_alpha_border = false 🔗
Se true, inserisce pixel dello stesso colore circostante in transizione dalle aree trasparenti alle aree opache. Per le texture visualizzate con il filtro bilineare, questo aiuta a ridurre l'effetto contorno quando si esportano immagini da un editor di immagini.
An alternative to fixing darkened borders with fix_alpha_border is to use premultiplied alpha. By enabling this option, the texture will be converted to this format. A premultiplied alpha texture requires specific materials to be displayed correctly:
In 2D, a CanvasItemMaterial will need to be created and configured to use the CanvasItemMaterial.BLEND_MODE_PREMULT_ALPHA blend mode on CanvasItems that use this texture. In custom
canvas_itemshaders,render_mode blend_premul_alpha;should be used.In 3D, a BaseMaterial3D will need to be created and configured to use the BaseMaterial3D.BLEND_MODE_PREMULT_ALPHA blend mode on materials that use this texture. In custom
spatialshaders,render_mode blend_premul_alpha;should be used.
Sostituisce la saturazione della texture.