You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Added Image's load_svg_from_(buffer|string)
No core dependency to the svg module.
This commit is contained in:
@@ -244,8 +244,7 @@ static Ref<ImageTexture> editor_generate_icon(int p_index, float p_scale, float
|
||||
// Generating upsampled icons is slower, and the benefit is hardly visible
|
||||
// with integer editor scales.
|
||||
const bool upsample = !Math::is_equal_approx(Math::round(p_scale), p_scale);
|
||||
ImageLoaderSVG img_loader;
|
||||
Error err = img_loader.create_image_from_string(img, editor_icons_sources[p_index], p_scale, upsample, p_convert_colors);
|
||||
Error err = ImageLoaderSVG::create_image_from_string(img, editor_icons_sources[p_index], p_scale, upsample, p_convert_colors);
|
||||
ERR_FAIL_COND_V_MSG(err != OK, Ref<ImageTexture>(), "Failed generating icon, unsupported or invalid SVG data in editor theme.");
|
||||
if (p_saturation != 1.0) {
|
||||
img->adjust_bcs(1.0, 1.0, p_saturation);
|
||||
|
||||
Reference in New Issue
Block a user