The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Draw filled open paths

These changes was commited to the Birdfont repository Sat, 07 Nov 2015 11:16:47 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Sat, 07 Nov 2015 11:16:47 +0000]

Updated Files

libbirdfont/BezierTool.vala
libbirdfont/BirdFontFile.vala
libbirdfont/EditPoint.vala
libbirdfont/Glyph.vala
libbirdfont/OpenFontFormat/GlyfTable.vala
libbirdfont/OverViewItem.vala
libbirdfont/Path.vala
libbirdfont/PenTool.vala
libbirdfont/RectangleTool.vala
libbirdfont/StrokeTool.vala
libbirdfont/SvgParser.vala
libbirdfont/Task.vala
libbirdfont/TrackTool.vala
--- a/libbirdfont/BezierTool.vala +++ b/libbirdfont/BezierTool.vala @@ -163,7 +163,7 @@ current_point = current_path.add (px, py); current_path.hide_end_handle = true; current_point.get_left_handle ().convert_to_line (); - current_point.recalculate_linear_handles (); + current_path.recalculate_linear_handles_for_point (current_point); set_point_type (); corner_node = false; state = MOVE_POINT; @@ -172,7 +172,7 @@ current_point = current_path.add (px, py); current_path.hide_end_handle = true; current_point.get_left_handle ().convert_to_line (); - current_point.recalculate_linear_handles (); + current_path.recalculate_linear_handles_for_point (current_point); set_point_type (); g.clear_active_paths (); g.add_active_path (null, current_path); @@ -188,7 +188,7 @@ current_path.hide_end_handle = true; current_point = current_path.add (px, py); current_point.get_left_handle ().convert_to_line (); - current_point.recalculate_linear_handles (); + current_path.recalculate_linear_handles_for_point (current_point); g.add_path (current_path); set_point_type (); @@ -279,7 +279,7 @@ current_point = current_path.add (px, py); current_path.hide_end_handle = true; current_point.get_left_handle ().convert_to_line (); - current_point.recalculate_linear_handles (); + current_path.recalculate_linear_handles_for_point (current_point); set_point_type (); g.clear_active_paths (); g.add_active_path (null, current_path); @@ -336,7 +336,7 @@ current_point.x = px; current_point.y = py; current_path.hide_end_handle = true; - current_point.recalculate_linear_handles (); + current_path.recalculate_linear_handles_for_point (current_point); current_path.reset_stroke (); if (current_point.type == PointType.QUADRATIC) { @@ -400,8 +400,8 @@ p = current_path.points.get (s - 2); p.get_right_handle ().convert_to_line (); current_point.get_left_handle ().convert_to_line (); - p.recalculate_linear_handles (); - current_point.recalculate_linear_handles (); + current_path.recalculate_linear_handles_for_point (p); + current_path.recalculate_linear_handles_for_point (current_point); current_path.reset_stroke (); GlyphCanvas.redraw ();
--- a/libbirdfont/BirdFontFile.vala +++ b/libbirdfont/BirdFontFile.vala @@ -1427,7 +1427,7 @@ ep.get_right_handle ().type = PointType.LINE_DOUBLE_CURVE; ep.get_left_handle ().type = PointType.LINE_DOUBLE_CURVE; ep.type = PointType.LINE_DOUBLE_CURVE; - ep.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (ep); } private static void cubic_line (Path path, string px, string py) { @@ -1437,7 +1437,7 @@ ep = path.points.get (path.points.size - 1); ep.get_right_handle ().type = PointType.LINE_CUBIC; ep.type = PointType.LINE_CUBIC; - ep.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (ep); } private static void quadratic (Path path, string px0, string py0, string px1, string py1) { @@ -1454,7 +1454,7 @@ } ep1 = path.points.get (path.points.size - 1); - ep1.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (ep1); ep1.get_right_handle ().type = PointType.QUADRATIC; ep1.get_right_handle ().move_to_coordinate (x0, y0); ep1.type = PointType.QUADRATIC; @@ -1462,7 +1462,7 @@ path.add (x1, y1); ep2 = path.points.get (path.points.size - 1); - ep2.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (ep2); ep2.get_left_handle ().type = PointType.QUADRATIC; ep2.get_left_handle ().move_to_coordinate (x0, y0); ep2.type = PointType.QUADRATIC; @@ -1493,11 +1493,11 @@ ly = ep1.y + ((y2 - ep1.y) / 3); ep1.get_right_handle ().move_to_coordinate (lx, ly); - ep1.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (ep1); // set curve handles ep1 = path.points.get (path.points.size - 1); - ep1.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (ep1); ep1.get_right_handle ().type = PointType.CUBIC; ep1.get_right_handle ().move_to_coordinate (x0, y0); ep1.type = PointType.CUBIC; @@ -1505,12 +1505,12 @@ path.add (x2, y2); ep2 = path.points.get (path.points.size - 1); - ep2.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (ep2); ep2.get_left_handle ().type = PointType.CUBIC; ep2.get_left_handle ().move_to_coordinate (x1, y1); ep2.type = PointType.CUBIC; - ep1.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (ep2); } /** Two quadratic off curve points. */ @@ -1539,24 +1539,22 @@ ly = ep1.y + ((y2 - ep1.y) / 4); ep1.get_right_handle ().move_to_coordinate (lx, ly); - ep1.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (ep1); // set curve handles ep1 = path.points.get (path.points.size - 1); - ep1.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (ep1); ep1.get_right_handle ().type = PointType.DOUBLE_CURVE; ep1.get_right_handle ().move_to_coordinate (x0, y0); ep1.type = PointType.DOUBLE_CURVE; - path.add (x2, y2); - - ep2 = path.points.get (path.points.size - 1); - ep2.recalculate_linear_handles (); + ep2 = path.add (x2, y2); + path.recalculate_linear_handles_for_point (ep2); ep2.get_left_handle ().type = PointType.DOUBLE_CURVE; ep2.get_left_handle ().move_to_coordinate (x1, y1); ep2.type = PointType.DOUBLE_CURVE; - ep1.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (ep1); } public static void close (Path path) {
--- a/libbirdfont/EditPoint.vala +++ b/libbirdfont/EditPoint.vala @@ -253,120 +253,6 @@ } } - /** Set bezier points for linear paths. */ - public void recalculate_linear_handles () { - unowned EditPointHandle h; - unowned EditPoint n; - double nx, ny; - - return_if_fail (!is_null (right_handle) && !is_null (left_handle)); - - if (prev == null && next != null) { - // FIXME: prev = get_next ().last (); - } - - // left handle - if (prev != null) { - n = get_prev (); - h = get_left_handle (); - - return_if_fail (!is_null (n) && !is_null (h)); - - if (h.type == PointType.LINE_CUBIC) { - nx = x + ((n.x - x) / 3); - ny = y + ((n.y - y) / 3); - h.move_to_coordinate (nx, ny); - } - - if (h.type == PointType.LINE_DOUBLE_CURVE) { - nx = x + ((n.x - x) / 4); - ny = y + ((n.y - y) / 4); - h.move_to_coordinate (nx, ny); - } - - if (h.type == PointType.LINE_QUADRATIC) { - nx = x + ((n.x - x) / 2); - ny = y + ((n.y - y) / 2); - h.move_to_coordinate (nx, ny); - } - - // the other side - h = n.get_right_handle (); - return_if_fail (!is_null (h) && !is_null (h)); - - if (h.type == PointType.LINE_DOUBLE_CURVE) { - nx = n.x + ((x - n.x) / 4); - ny = n.y + ((y - n.y) / 4); - h.move_to_coordinate (nx, ny); - } - - if (h.type == PointType.LINE_CUBIC) { - nx = n.x + ((x - n.x) / 3); - ny = n.y + ((y - n.y) / 3); - h.move_to_coordinate (nx, ny); - } - - if (h.type == PointType.LINE_QUADRATIC) { - nx = n.x + ((x - n.x) / 2); - ny = n.y + ((y - n.y) / 2); - h.move_to_coordinate (nx, ny); - } - } - - // right handle - if (next != null) { - n = get_next (); - h = get_right_handle (); - - return_if_fail (!is_null (n) && !is_null (h)); - - if (h.type == PointType.LINE_CUBIC) { - nx = x + ((n.x - x) / 3); - ny = y + ((n.y - y) / 3); - - h.move_to_coordinate (nx, ny); - } - - if (h.type == PointType.LINE_DOUBLE_CURVE) { - nx = x + ((n.x - x) / 4); - ny = y + ((n.y - y) / 4); - - h.move_to_coordinate (nx, ny); - } - - if (h.type == PointType.LINE_QUADRATIC) { - nx = x + ((n.x - x) / 2); - ny = y + ((n.y - y) / 2); - - h.move_to_coordinate (nx, ny); - } - - h = n.get_left_handle (); - return_if_fail (!is_null (h)); - - if (h.type == PointType.LINE_CUBIC) { - nx = n.x + ((x - n.x) / 3); - ny = n.y + ((y - n.y) / 3); - - h.move_to_coordinate (nx, ny); - } - - if (h.type == PointType.LINE_DOUBLE_CURVE) { - nx = n.x + ((x - n.x) / 4); - ny = n.y + ((y - n.y) / 4); - - h.move_to_coordinate (nx, ny); - } - - if (h.type == PointType.LINE_QUADRATIC) { - nx = n.x + ((x - n.x) / 2); - ny = n.y + ((y - n.y) / 2); - - h.move_to_coordinate (nx, ny); - } - } - } - public bool is_clockwise () { return get_direction () >= 0; }
--- a/libbirdfont/Glyph.vala +++ b/libbirdfont/Glyph.vala @@ -1599,7 +1599,8 @@ public void draw_paths (Context cr, Color? c = null) { PathList stroke; Color color; - + bool open; + cr.save (); cr.new_path (); foreach (Path p in get_visible_paths ()) { @@ -1615,7 +1616,18 @@ stroke = p.get_stroke_fast (); draw_path_list (stroke, cr, color); } else { + open = p.is_open (); + + if (open) { + p.close (); + p.recalculate_linear_handles (); + } + p.draw_path (cr, this, color); + + if (open) { + p.reopen (); + } } } cr.fill ();
--- a/libbirdfont/OpenFontFormat/GlyfTable.vala +++ b/libbirdfont/OpenFontFormat/GlyfTable.vala @@ -650,7 +650,7 @@ edit_point.get_left_handle ().set_point_type (PointType.NONE); edit_point.get_left_handle ().length = 0; } else { - edit_point.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (edit_point); } prev_is_curve = false;
--- a/libbirdfont/OverViewItem.vala +++ b/libbirdfont/OverViewItem.vala @@ -200,7 +200,7 @@ Surface s; Context c; Color color = Color.black (); - + w = width; h = height; @@ -228,7 +228,7 @@ gy = (h / glyph_scale) - 25 / glyph_scale; c.translate (gx - Glyph.xc () - g.get_lsb (), g.get_baseline () + gy - Glyph.yc ()); - + g.draw_paths (c, color); c.restore (); } else {
--- a/libbirdfont/Path.vala +++ b/libbirdfont/Path.vala @@ -1008,12 +1008,6 @@ last_point = p; return p; - } - - public void recalculate_linear_handles () { - foreach (EditPoint e in points) { - e.recalculate_linear_handles (); - } } public void close () { @@ -1023,8 +1017,8 @@ create_list (); if (points.size > 2) { - points.get (0).recalculate_linear_handles (); - points.get (points.size - 1).recalculate_linear_handles (); + recalculate_linear_handles_for_point (get_last_point ()); + recalculate_linear_handles_for_point (get_first_point ()); } } @@ -1379,9 +1373,7 @@ } create_list (); - foreach (EditPoint p in points) { - p.recalculate_linear_handles (); - } + recalculate_linear_handles (); } /** Get a point on the this path closest to x and y coordinates. @@ -2511,8 +2503,130 @@ start.get_right_handle ().move_to_coordinate (x1, y1); end.get_left_handle ().move_to_coordinate (x2, y2); + } + + public void recalculate_linear_handles () { + foreach (EditPoint e in points) { + recalculate_linear_handles_for_point (e); + } + } + + /** Set bezier points for linear paths. */ + public void recalculate_linear_handles_for_point (EditPoint ep) { + EditPointHandle h; + EditPoint n; + double nx, ny; + + return_if_fail (!is_null (ep.right_handle) && !is_null (ep.left_handle)); + + // left handle + if (ep.prev != null) { + n = ep.get_prev (); + h = ep.get_left_handle (); + } else { + n = get_last_point (); + h = ep.get_left_handle (); + } + + return_if_fail (!is_null (n) && !is_null (h)); + + if (h.type == PointType.LINE_CUBIC) { + nx = ep.x + ((n.x - ep.x) / 3); + ny = ep.y + ((n.y - ep.y) / 3); + h.move_to_coordinate (nx, ny); + } + + if (h.type == PointType.LINE_DOUBLE_CURVE) { + nx = ep.x + ((n.x - ep.x) / 4); + ny = ep.y + ((n.y - ep.y) / 4); + h.move_to_coordinate (nx, ny); + } + + if (h.type == PointType.LINE_QUADRATIC) { + nx = ep.x + ((n.x - ep.x) / 2); + ny = ep.y + ((n.y - ep.y) / 2); + h.move_to_coordinate (nx, ny); + } + + // the other side + h = n.get_right_handle (); + return_if_fail (!is_null (h) && !is_null (h)); + + if (h.type == PointType.LINE_DOUBLE_CURVE) { + nx = n.x + ((ep.x - n.x) / 4); + ny = n.y + ((ep.y - n.y) / 4); + h.move_to_coordinate (nx, ny); + } + + if (h.type == PointType.LINE_CUBIC) { + nx = n.x + ((ep.x - n.x) / 3); + ny = n.y + ((ep.y - n.y) / 3); + h.move_to_coordinate (nx, ny); + } + + if (h.type == PointType.LINE_QUADRATIC) { + nx = n.x + ((ep.x - n.x) / 2); + ny = n.y + ((ep.y - n.y) / 2); + h.move_to_coordinate (nx, ny); + } + + // right handle + if (ep.next != null) { + n = ep.get_next (); + h = ep.get_right_handle (); + } else { + n = get_first_point (); + h = ep.get_right_handle (); + } + + return_if_fail (!is_null (n) && !is_null (h)); + + if (h.type == PointType.LINE_CUBIC) { + nx = ep.x + ((n.x - ep.x) / 3); + ny = ep.y + ((n.y - ep.y) / 3); + + h.move_to_coordinate (nx, ny); + } + + if (h.type == PointType.LINE_DOUBLE_CURVE) { + nx = ep.x + ((n.x - ep.x) / 4); + ny = ep.y + ((n.y - ep.y) / 4); + + h.move_to_coordinate (nx, ny); + } + + if (h.type == PointType.LINE_QUADRATIC) { + nx = ep.x + ((n.x - ep.x) / 2); + ny = ep.y + ((n.y - ep.y) / 2); + + h.move_to_coordinate (nx, ny); + } + + h = n.get_left_handle (); + return_if_fail (!is_null (h)); + + if (h.type == PointType.LINE_CUBIC) { + nx = n.x + ((ep.x - n.x) / 3); + ny = n.y + ((ep.y - n.y) / 3); + + h.move_to_coordinate (nx, ny); + } + + if (h.type == PointType.LINE_DOUBLE_CURVE) { + nx = n.x + ((ep.x - n.x) / 4); + ny = n.y + ((ep.y - n.y) / 4); + + h.move_to_coordinate (nx, ny); + } + + if (h.type == PointType.LINE_QUADRATIC) { + nx = n.x + ((ep.x - n.x) / 2); + ny = n.y + ((ep.y - n.y) / 2); + + h.move_to_coordinate (nx, ny); + } } } }
--- a/libbirdfont/PenTool.vala +++ b/libbirdfont/PenTool.vala @@ -905,7 +905,7 @@ } selected.path.reset_stroke (); - selected.point.recalculate_linear_handles (); + selected.path.recalculate_linear_handles_for_point(selected.point); selected.path.update_region_boundaries (); } } else if (GridTool.has_ttf_grid ()) { @@ -939,7 +939,7 @@ } selected.path.reset_stroke (); - selected.point.recalculate_linear_handles (); + selected.path.recalculate_linear_handles_for_point(selected.point); selected.path.update_region_boundaries (); } } else { @@ -970,7 +970,7 @@ selected.point.y + delta_coordinate_y); } - selected.point.recalculate_linear_handles (); + selected.path.recalculate_linear_handles_for_point(selected.point); selected.path.reset_stroke (); selected.path.update_region_boundaries (); } @@ -1346,9 +1346,9 @@ path.points.get (0).left_handle.type = path.points.get (path.points.size - 1).left_handle.type; - - path.points.get (0).recalculate_linear_handles (); - path.points.get (path.points.size - 1).recalculate_linear_handles (); + + path.recalculate_linear_handles_for_point (path.points.get (0)); + path.recalculate_linear_handles_for_point (path.points.get (path.points.size - 1)); // force the connected handle to move path.points.get (0).set_position ( @@ -1360,12 +1360,12 @@ if (last_segment_is_line) { path.get_first_point ().get_left_handle ().convert_to_line (); - path.get_first_point ().recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (path.get_first_point ()); } if (first_segment_is_line) { path.get_first_point ().get_right_handle ().convert_to_line (); - path.get_first_point ().recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (path.get_first_point ()); } } @@ -1895,7 +1895,7 @@ static void set_default_handle_positions_on_path (Path path) { foreach (EditPoint e in path.points) { if (!e.tie_handles && !e.reflective_point) { - e.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (e); } } } @@ -2226,28 +2226,28 @@ if (keyval == Key.UP) { foreach (PointSelection e in selected_points) { e.point.set_position (e.point.x, e.point.y + Glyph.ivz ()); - e.point.recalculate_linear_handles (); + e.path.recalculate_linear_handles_for_point (e.point); } } if (keyval == Key.DOWN) { foreach (PointSelection e in selected_points) { e.point.set_position (e.point.x, e.point.y - Glyph.ivz ()); - e.point.recalculate_linear_handles (); + e.path.recalculate_linear_handles_for_point (e.point); } } if (keyval == Key.LEFT) { foreach (PointSelection e in selected_points) { e.point.set_position (e.point.x - Glyph.ivz (), e.point.y); - e.point.recalculate_linear_handles (); + e.path.recalculate_linear_handles_for_point (e.point); } } if (keyval == Key.RIGHT) { foreach (PointSelection e in selected_points) { e.point.set_position (e.point.x + Glyph.ivz (), e.point.y); - e.point.recalculate_linear_handles (); + e.path.recalculate_linear_handles_for_point (e.point); } } @@ -2292,7 +2292,7 @@ ep.set_reflective_handles (false); if (ep.next == null) { - // FIXME: write a new function for this case + // FIXME: write a new method for this case // warning ("Next is null."); } @@ -2362,7 +2362,7 @@ } - ep.recalculate_linear_handles (); + //FIXME: ep.recalculate_linear_handles (); } public static void convert_segment_to_line () { @@ -2376,6 +2376,10 @@ foreach (PointSelection p in selected_points) { convert_point_to_line (p.point, false); } + } + + foreach (PointSelection p in selected_points) { + p.path.recalculate_linear_handles_for_point (p.point); } } @@ -2482,7 +2486,7 @@ // process connected handle if (point_type == PointType.QUADRATIC) { first.set_position (first.x, first.y); - first.recalculate_linear_handles (); + // FIXME: linear handles } } @@ -2521,6 +2525,7 @@ } convert_point_type (e, DrawingTools.point_type); + ps.path.recalculate_linear_handles_for_point (ps.point); } if (reset_selected) {
--- a/libbirdfont/RectangleTool.vala +++ b/libbirdfont/RectangleTool.vala @@ -81,7 +81,7 @@ g.add_path (rectangle); foreach (EditPoint e in rectangle.points) { - e.recalculate_linear_handles (); + rectangle.recalculate_linear_handles_for_point (e); } rectangle.reset_stroke ();
--- a/libbirdfont/StrokeTool.vala +++ b/libbirdfont/StrokeTool.vala @@ -1042,7 +1042,7 @@ last = added_segment.get_last_point (); last.right_handle = ep.get_right_handle ().copy (); - last.recalculate_linear_handles (); + added_segment.recalculate_linear_handles_for_point (last); simplified.append_path (added_segment); @@ -1051,7 +1051,7 @@ if (added_segment.points.size > 0) { if (ep_start.get_right_handle ().is_line ()) { first = added_segment.get_first_point (); - first.recalculate_linear_handles (); + simplified.recalculate_linear_handles_for_point (first); } } @@ -1189,7 +1189,7 @@ nend = cap.add (end.x, end.y); for (int i = 0; i < cap.points.size; i++) { - cap.points.get (i).recalculate_linear_handles (); + cap.recalculate_linear_handles_for_point (cap.points.get (i)); } int size = cap.points.size; @@ -1220,7 +1220,7 @@ stroke2.delete_first_point (); last.convert_to_line (); - last.recalculate_linear_handles (); + stroke1.recalculate_linear_handles_for_point (last); last.next = stroke1.add_point (stroke2.get_first_point ()).get_link_item (); stroke2.delete_first_point (); @@ -1418,8 +1418,8 @@ cutoff2 = stroked.add_point (cutoff2); } - cutoff1.recalculate_linear_handles (); - cutoff2.recalculate_linear_handles (); + stroked.recalculate_linear_handles_for_point (cutoff1); + stroked.recalculate_linear_handles_for_point (cutoff2); // self intersection if (!d1 && !d2) { @@ -1755,15 +1755,15 @@ PenTool.convert_point_to_line (ep2, true); PenTool.convert_point_to_line (ep3, true); - ep1.recalculate_linear_handles (); - ep2.recalculate_linear_handles (); - ep3.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (ep1); + path.recalculate_linear_handles_for_point (ep2); + path.recalculate_linear_handles_for_point (ep3); d = Path.distance_to_point (prev, next); prev.get_right_handle ().length *= Path.distance_to_point (prev, ep1) / d; next.get_left_handle ().length *= Path.distance_to_point (ep3, next) / d; - next.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (next); return ep2; }
--- a/libbirdfont/SvgParser.vala +++ b/libbirdfont/SvgParser.vala @@ -1817,7 +1817,7 @@ } foreach (EditPoint e in smooth_points) { - e.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (e); } for (int i = 0; i < 3; i++) { @@ -1890,7 +1890,7 @@ return_val_if_fail (path.points.size != 0, path_list); ep = path.points.get (path.points.size - 1); ep.get_right_handle ().set_point_type (PointType.LINE_CUBIC); - ep.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (ep); } else { warning ("Unexpected type: %s", (!) b[first_index].type.to_string ()); } @@ -1965,7 +1965,7 @@ } foreach (EditPoint e in smooth_points) { - e.recalculate_linear_handles (); + path.recalculate_linear_handles_for_point (e); } for (int i = 0; i < 3; i++) {
--- a/libbirdfont/Task.vala +++ b/libbirdfont/Task.vala @@ -43,7 +43,6 @@ } public void cancel () { - print("Cancel task.\n"); lock (cancelled) { if (unlikely (!cancelable)) { warning ("Task is not cancelable."); @@ -70,7 +69,6 @@ } task (); - print("Task finished.\n"); } public void* perform_task() {
--- a/libbirdfont/TrackTool.vala +++ b/libbirdfont/TrackTool.vala @@ -475,7 +475,7 @@ p.point.set_tie_handle (false); p.point.get_left_handle ().convert_to_line (); p.point.get_right_handle ().convert_to_line (); - p.point.recalculate_linear_handles (); + p.path.recalculate_linear_handles_for_point (p.point); last_update = get_current_time (); MainWindow.get_current_glyph ().update_view (); } @@ -582,7 +582,7 @@ previous = average.get_prev (); previous.type = DrawingTools.point_type; PenTool.convert_point_to_line (previous, true); - previous.recalculate_linear_handles (); + p.recalculate_linear_handles_for_point (previous); previous.process_tied_handle (); previous.set_tie_handle (false); }