浏览代码

Merge pull request #59114 from timothyqiu/svg-size

Rémi Verschelde 3 年之前
父节点
当前提交
f35fb070dd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/svg/image_loader_svg.cpp

+ 1 - 1
modules/svg/image_loader_svg.cpp

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