DPITexture
Expérimental : This class may be changed or removed in future versions.
Hérite de : Texture2D < Texture < Resource < RefCounted < Object
An automatically scalable Texture2D based on an SVG image.
Description
An automatically scalable Texture2D based on an SVG image. DPITextures are used to automatically re-rasterize icons and other texture based UI theme elements to match viewport scale and font oversampling. See also ProjectSettings.display/window/stretch/mode ("canvas_items" mode) and Viewport.oversampling_override.
Propriétés
|
||
|
||
resource_local_to_scene |
|
|
|
Méthodes
create_from_string(source: String, scale: float = 1.0, saturation: float = 1.0, color_map: Dictionary = {}) static |
|
get_scaled_rid() const |
|
get_source() const |
|
void |
set_size_override(size: Vector2i) |
void |
set_source(source: String) |
Descriptions des propriétés
Échelle de la texture. 1.0 est la taille SVG originale. Des valeurs plus élevées résultent en une image plus grande.
Dictionary color_map = {} 🔗
void set_color_map(value: Dictionary)
Dictionary get_color_map()
If set, remaps texture colors according to Color-Color map.
Redéfinit la saturation de la texture.
Descriptions des méthodes
DPITexture create_from_string(source: String, scale: float = 1.0, saturation: float = 1.0, color_map: Dictionary = {}) static 🔗
Creates a new DPITexture and initializes it by allocating and setting the SVG data from string.
Returns the RID of the texture rasterized to match the oversampling of the currently drawn canvas item.
Returns SVG source code.
void set_size_override(size: Vector2i) 🔗
Redimensionne la texture aux dimensions spécifiées.
void set_source(source: String) 🔗
Sets SVG source code.