diff options
author | Nathan Franke <me@nathan.sh> | 2022-07-21 20:11:27 -0500 |
---|---|---|
committer | Nathan Franke <me@nathan.sh> | 2022-07-21 20:11:29 -0500 |
commit | eb8482cf95cb946525959b0ae8b910011f6a5295 (patch) | |
tree | 154e88f66f55c9cd37a5fc24771f554454992e49 | |
parent | b3bd08207032ca146319f4b25654bcddd31ee401 (diff) |
round dimensions of svg
-rw-r--r-- | modules/svg/image_loader_svg.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/svg/image_loader_svg.cpp b/modules/svg/image_loader_svg.cpp index dcb1f1d744..87e2fae2d0 100644 --- a/modules/svg/image_loader_svg.cpp +++ b/modules/svg/image_loader_svg.cpp @@ -80,8 +80,8 @@ void ImageLoaderSVG::create_image_from_string(Ref<Image> p_image, String p_strin float fw, fh; picture->size(&fw, &fh); - uint32_t width = MIN(fw * p_scale, 16 * 1024); - uint32_t height = MIN(fh * p_scale, 16 * 1024); + uint32_t width = MIN(round(fw * p_scale), 16 * 1024); + uint32_t height = MIN(round(fh * p_scale), 16 * 1024); picture->size(width, height); std::unique_ptr<tvg::SwCanvas> sw_canvas = tvg::SwCanvas::gen(); |