Clone in a terminal:
Commit f303c57
Johan Mattsson - 2016-07-22T17:01:24+00:00
f303c578bf1ab232a57226710f852bb27f46ea20johan.mattsson.m@gmail.com

Fix SVG bounding box

Changed files (2)

Diff

diff --git a/libsvgbird/Object.vala b/libsvgbird/Object.valaindex 2953b75..034c618 100644--- a/libsvgbird/Object.vala+++ b/libsvgbird/Object.vala@@ -310,16 +310,15 @@ public abstract class Object : GLib.Object { 		draw_outline (context);  		context.save ();-+		context.set_matrix (Matrix.identity ());+		 		if (has_stroke) { 			context.stroke_extents (out x0, out y0, out x1, out y1); 		} else { 			context.fill_extents (out x0, out y0, out x1, out y1); 		}-		-		Matrix matrix = context.get_matrix ();-		matrix.transform_point (ref x0, ref y0);-		matrix.transform_point (ref x1, ref y1);++		context.set_matrix (view_matrix);  		context.fill (); 		context.restore ();diff --git a/libsvgbird/SvgTransform.vala b/libsvgbird/SvgTransform.valaindex 2ba7b39..9b54ce1 100644--- a/libsvgbird/SvgTransform.vala+++ b/libsvgbird/SvgTransform.vala@@ -73,13 +73,11 @@ public class SvgTransform : GLib.Object { 				double r = arguments.get_double (0); 				r *= Math.PI / 180; 				matrix.rotate (r);-				return matrix; 			} 		} else if (type == TransformType.SCALE) { 			if (arguments.size == 1) { 				double s = arguments.get_double (0); 				matrix.scale (s, s);-				return matrix; 			} else if (arguments.size == 2) { 				double s0 = arguments.get_double (0); 				double s1 = arguments.get_double (1);

Contact

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