Commit 6c1f454
Fix position of SVG ellipse
Changed files (5)
modifiedlibbirdfont/Glyph.valamodifiedlibsvgbird/Circle.valamodifiedlibsvgbird/Ellipse.valamodifiedlibsvgbird/Rectangle.valamodifiedlibsvgbird/SvgDrawing.vala
Diff
@@ -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) {@@ -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 () {@@ -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 () {@@ -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; @@ -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;