Merge pull request #59114 from timothyqiu/svg-size

This commit is contained in:
Rémi Verschelde 2022-03-13 17:41:23 +01:00 committed by GitHub
commit f35fb070dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,7 +78,7 @@ void ImageLoaderSVG::create_image_from_string(Ref<Image> p_image, String p_strin
return;
}
float fw, fh;
picture->viewbox(nullptr, nullptr, &fw, &fh);
picture->size(&fw, &fh);
uint32_t width = MIN(fw * p_scale, 16 * 1024);
uint32_t height = MIN(fh * p_scale, 16 * 1024);