Clone in a terminal:
Commit 9ddcb09
Johan Mattsson - 2016-10-02T13:04:06+00:00
9ddcb091d91719d0b70dd0b6910a40a33d8a0807johan.mattsson.m@gmail.com

Insert points in SVG paths

Changed files (1)

Diff

diff --git a/libsvgbird/Points.vala b/libsvgbird/Points.valaindex 4977b2b..4f5f4e1 100644--- a/libsvgbird/Points.vala+++ b/libsvgbird/Points.vala@@ -55,8 +55,16 @@ public class Points : GLib.Object { 	public int add_cubic (double handle_x, double handle_y, 		double next_handle_x, double next_handle_y, 		double x, double y) {++		return insert_cubic (size, handle_x, handle_y,+			next_handle_x, next_handle_y, x, y);+	}++	public int insert_cubic (int position, double handle_x, double handle_y,+		double next_handle_x, double next_handle_y,+		double x, double y) { 		-		int index;+		int index = position; 		 		if (size == 0) { 			index = 0;@@ -70,7 +78,7 @@ public class Points : GLib.Object { 			insert (index + 7, 0); 		} 		-		index = size;+		index = position; 		insert_type (index, POINT_CUBIC); 		insert (index + 1, handle_x); 		insert (index + 2, handle_y);@@ -82,7 +90,7 @@ public class Points : GLib.Object {  		return index; 	}-+	 	public Points copy () { 		Points p = new Points (); 		p.point_data = point_data.copy ();

Contact

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