The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Assume end points in open paths are curve points

These changes was commited to the Birdfont repository Fri, 10 Oct 2014 13:15:03 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Fri, 10 Oct 2014 13:15:03 +0000]

Updated Files

libbirdfont/EditPoint.vala
libbirdfont/Path.vala
libbirdfont/PenTool.vala
--- a/libbirdfont/EditPoint.vala +++ b/libbirdfont/EditPoint.vala @@ -531,7 +531,12 @@ left_handle.convert_to_line (); right_handle.convert_to_line (); } - + + public void convert_to_curve () { + left_handle.convert_to_curve (); + right_handle.convert_to_curve (); + } + public string to_string () { StringBuilder s = new StringBuilder (); s.append (@"Position: $x, $y\n");
--- a/libbirdfont/Path.vala +++ b/libbirdfont/Path.vala @@ -1667,8 +1667,23 @@ ep = p; break; } + } + + // don't tie end points on the open path + if (points.size > 1) { + p = points.get (1); + p.convert_to_curve (); + p.set_reflective_handles (false); + p.set_tie_handle (false); } + if (points.size > 0) { + p = points.get (points.size - 1); + p.convert_to_curve (); + p.set_reflective_handles (false); + p.set_tie_handle (false); + } + // copy points after the deleted point while (i < points.size) { p = points.get (i);
--- a/libbirdfont/PenTool.vala +++ b/libbirdfont/PenTool.vala @@ -268,8 +268,6 @@ public static void delete_selected_points () { Glyph g = MainWindow.get_current_glyph (); - - print ("Break path."); foreach (PointSelection p in selected_points) { p.point.deleted = true;