You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
round dimensions of svg
This commit is contained in:
@@ -80,8 +80,8 @@ void ImageLoaderSVG::create_image_from_string(Ref<Image> p_image, String p_strin
|
|||||||
float fw, fh;
|
float fw, fh;
|
||||||
picture->size(&fw, &fh);
|
picture->size(&fw, &fh);
|
||||||
|
|
||||||
uint32_t width = MIN(fw * p_scale, 16 * 1024);
|
uint32_t width = MIN(round(fw * p_scale), 16 * 1024);
|
||||||
uint32_t height = MIN(fh * p_scale, 16 * 1024);
|
uint32_t height = MIN(round(fh * p_scale), 16 * 1024);
|
||||||
picture->size(width, height);
|
picture->size(width, height);
|
||||||
|
|
||||||
std::unique_ptr<tvg::SwCanvas> sw_canvas = tvg::SwCanvas::gen();
|
std::unique_ptr<tvg::SwCanvas> sw_canvas = tvg::SwCanvas::gen();
|
||||||
|
|||||||
Reference in New Issue
Block a user