The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Scale view box

These changes was commited to the Birdfont repository Sat, 02 Jul 2016 10:17:43 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Sat, 02 Jul 2016 10:17:43 +0000]

Updated Files

libsvgbird/SvgDrawing.vala
--- a/libsvgbird/SvgDrawing.vala +++ b/libsvgbird/SvgDrawing.vala @@ -88,15 +88,15 @@ if (!box.slice) { if ((box.alignment & ViewBox.XMID) > 0) { - cr.translate ((box.width - width) / 2, 0); + cr.translate (((box.width - width) * scale) / 2, 0); } else if ((box.alignment & ViewBox.XMAX) > 0) { - cr.translate (box.width - width, 0); + cr.translate ((box.width - width) * scale, 0); } if ((box.alignment & ViewBox.YMID) > 0) { - cr.translate (0, (box.height - height) / 2); + cr.translate (0, ((box.height - height) * scale) / 2); } else if ((box.alignment & ViewBox.YMAX) > 0) { - cr.translate (0, box.height - height); + cr.translate (0, (box.height - height) * scale); } } else { Layer layer = new Layer ();