Clone in a terminal:
Commit 2be5bea
Johan Mattsson - 2016-07-02T10:17:43+00:00
2be5bea83a7e74cd232505ccabfa495e1a7d1742johan.mattsson.m@gmail.com

Scale view box

Changed files (1)

Diff

diff --git a/libsvgbird/SvgDrawing.vala b/libsvgbird/SvgDrawing.valaindex 0aa8bf4..5aeb4ee 100644--- a/libsvgbird/SvgDrawing.vala+++ b/libsvgbird/SvgDrawing.vala@@ -88,15 +88,15 @@ public class SvgDrawing : Object { 			 			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 ();

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112