Merge pull request #1459 from lovell/svgload-scale-rounding
Ensure SVG dimensions are rounded correctly when scaling or setting density via cairo
This commit is contained in:
commit
933f8150f8
|
@ -280,8 +280,8 @@ vips_foreign_load_svg_parse( VipsForeignLoadSvg *svg, VipsImage *out )
|
||||||
* cairo instead.
|
* cairo instead.
|
||||||
*/
|
*/
|
||||||
svg->cairo_scale = scale;
|
svg->cairo_scale = scale;
|
||||||
width = width * scale;
|
width = VIPS_ROUND_UINT( width * scale );
|
||||||
height = height * scale;
|
height = VIPS_ROUND_UINT( height * scale );
|
||||||
} else {
|
} else {
|
||||||
/* SVG with width and height reports correctly scaled
|
/* SVG with width and height reports correctly scaled
|
||||||
* dimensions.
|
* dimensions.
|
||||||
|
|
Loading…
Reference in New Issue