Fix determination of SVG canvas size

This commit is contained in:
Haoyu Qiu 2022-03-14 00:00:05 +08:00
parent 1164d083d2
commit 1049e75b89

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);