summaryrefslogtreecommitdiff
path: root/modules/svg/image_loader_svg.cpp
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2022-03-14 00:00:05 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2022-03-14 00:00:05 +0800
commit1049e75b8999d72398bc0c6fae49241cd2e248ee (patch)
tree6eeba9453e65cc0e9da85259f53c9c58ced8ee52 /modules/svg/image_loader_svg.cpp
parent1164d083d268187932e3a21215e170235a52621f (diff)
Fix determination of SVG canvas size
Diffstat (limited to 'modules/svg/image_loader_svg.cpp')
-rw-r--r--modules/svg/image_loader_svg.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/svg/image_loader_svg.cpp b/modules/svg/image_loader_svg.cpp
index 96b83bf25a..79ef2de929 100644
--- a/modules/svg/image_loader_svg.cpp
+++ b/modules/svg/image_loader_svg.cpp
@@ -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);