The Birdfont Source Code


All Repositories / birdfont.git / commit – 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
author Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 10 Oct 2014 13:15:03 +0000 (15:15 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 10 Oct 2014 13:15:03 +0000 (15:15 +0200)
commit 9d4df826258cc6c6af24618a9c0b2bd9307de033
tree 5798d85a61449686c7f999bedbd1590ce7e683bd
parent b2af50355589e1a299876c7dec4aaf12b157e12c
Assume end points in open paths are curve points

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;