Clone in a terminal:
Commit 6c1f454
Johan Mattsson - 2016-06-08T19:05:01+00:00
6c1f4544261615736fa6fc1b1f0b51763699c58ejohan.mattsson.m@gmail.com

Fix position of SVG ellipse

Changed files (5)

Diff

diff --git a/libbirdfont/Glyph.vala b/libbirdfont/Glyph.valaindex 82201d0..fdb1049 100644--- a/libbirdfont/Glyph.vala+++ b/libbirdfont/Glyph.vala@@ -1827,7 +1827,7 @@ public class Glyph : FontDisplay { 			redo_list.clear (); 		} 		-		// set_glyph_data (g); // FIXME: DELETE+		set_glyph_data (g); // FIXME: DELETE 	}  	public void print_layers (Layer layer, int indent = 0) {diff --git a/libsvgbird/Circle.vala b/libsvgbird/Circle.valaindex 146f6c1..eaad41b 100644--- a/libsvgbird/Circle.vala+++ b/libsvgbird/Circle.vala@@ -24,13 +24,6 @@ public class Circle : Object { 	 	public Circle () { 	}--	public Circle.create_copy (Circle c) {-		Object.copy_attributes (c, this);-		cx = c.cx;-		cx = c.cy;-		r = c.r;-	} 	 	public override bool is_over (double x, double y) { 		return false;@@ -57,7 +50,14 @@ public class Circle : Object { 	} 	 	public override Object copy () {-		return new Circle.create_copy (this);+		Circle c = new Circle ();+		+		Object.copy_attributes (this, c);+		c.cx = cx;+		c.cx = cy;+		c.r = r;+		+		return c;  	}  	public override string to_string () {diff --git a/libsvgbird/Ellipse.vala b/libsvgbird/Ellipse.valaindex ad93c7b..355d47b 100644--- a/libsvgbird/Ellipse.vala+++ b/libsvgbird/Ellipse.vala@@ -26,14 +26,6 @@ public class Ellipse : Object { 	 	public Ellipse () { 	}--	public Ellipse.create_copy (Ellipse c) {-		Object.copy_attributes (c, this);-		cx = c.cx;-		cx = c.cy;-		rx = c.rx;-		ry = c.ry;-	} 	 	public override bool is_over (double x, double y) { 		return false;@@ -64,7 +56,16 @@ public class Ellipse : Object { 	} 	 	public override Object copy () {-		return new Ellipse.create_copy (this);+		Ellipse e = new Ellipse ();+		Object.copy_attributes (this, e);+		+		print (@"cy $(cy)\n");+		+		e.cx = cx;+		e.cy = cy;+		e.rx = rx;+		e.ry = ry;+		return e; 	}  	public override string to_string () {diff --git a/libsvgbird/Rectangle.vala b/libsvgbird/Rectangle.valaindex 874f762..e80a591 100644--- a/libsvgbird/Rectangle.vala+++ b/libsvgbird/Rectangle.vala@@ -23,6 +23,8 @@ public class Rectangle : Object { 	public double y = 0; 	public double width = 0; 	public double height = 0;++	/** Corner radius */ 	public double rx = 0; 	public double ry = 0; @@ -81,6 +83,8 @@ public class Rectangle : Object { 		 		r.x = x; 		r.y = y;+		r.rx = rx;+		r.ry = ry; 		r.width = width; 		r.height = height; 		diff --git a/libsvgbird/SvgDrawing.vala b/libsvgbird/SvgDrawing.valaindex 48e70b0..bbc7756 100644--- a/libsvgbird/SvgDrawing.vala+++ b/libsvgbird/SvgDrawing.vala@@ -35,10 +35,19 @@ public class SvgDrawing : Object { 			svg_width = value; 		} 	}++	public double height {+		get {			+			return svg_height;+		}+		+		set {+			svg_height = value;+		}+	} 	 	public double svg_width = 0;-	-	public double height = 0;+	public double svg_height = 0;  	public override double xmin { 		get {@@ -94,6 +103,7 @@ public class SvgDrawing : Object { 	 	public override Object copy () { 		SvgDrawing drawing = new SvgDrawing ();+		SvgBird.Object.copy_attributes (this, drawing); 		drawing.root_layer = (Layer) root_layer.copy (); 		drawing.defs = defs.copy (); 		drawing.x = x;

Contact

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