Commit d86e42d
Copy SVG paths
Changed files (3)
Diff
@@ -65,7 +65,7 @@ public class Doubles : GLib.Object { public Doubles copy () { Doubles d = new Doubles (); delete d.data;- d.data = new double[capacity];+ d.data = new PointValue[capacity]; d.capacity = capacity; d.size = size; Posix.memcpy (d.data, data, sizeof (PointValue) * size);@@ -34,6 +34,15 @@ public class Points : GLib.Object { public void add_type (uchar type) { point_data.add_type (type); }++ public Points copy () {+ Points p = new Points ();+ p.point_data = point_data.copy ();+ p.x = x;+ p.y = y;+ p.closed = closed;+ return p;+ } } }@@ -24,6 +24,10 @@ public class SvgPath : Object { public SvgPath.create_copy (SvgPath p) { Object.copy_attributes (p, this);+ + foreach (Points point_data in p.points) {+ points.add (point_data.copy ());+ } } public override bool is_over (double x, double y) {