Commit 0e2c0de
Remove parts without are in stroke
Changed files (2)
Diff
@@ -47,6 +47,7 @@ public class ForesightTool : Tool { p.release_action (p, 1, last_move_x, last_move_y); } + MainWindow.set_cursor (NativeWindow.VISIBLE); state = NONE; }); @@ -57,6 +58,7 @@ public class ForesightTool : Tool { p.release_action (p, 1, last_move_x, last_move_y); } + MainWindow.set_cursor (NativeWindow.VISIBLE); state = NONE; }); @@ -211,6 +213,7 @@ public class ForesightTool : Tool { if (state == MOVE_HANDLES || state == MOVE_LAST_HANDLE) { if (previous_point > 0) { return_if_fail (PenTool.active_path.points.size >= previous_point + 1);+ return_if_fail (PenTool.active_path.points.size > 0); last = new PointSelection (PenTool.active_path.points.get (PenTool.active_path.points.size - (previous_point + 1)), PenTool.active_path); } else { if (unlikely (PenTool.selected_points.size == 0)) {@@ -1032,7 +1032,13 @@ public class StrokeTool : Tool { foreach (EditPoint ep in p.points) { l = ep.get_left_handle (); r = ep.get_right_handle ();- if (!(fabs (l.angle - r.angle) < 0.0001 && l.length > 0.01 && r.length > 0.01)) {+ + if (l.length < 0.01 || r.length < 0.01) {+ continue;+ }+ + if (!(fabs ((l.angle - r.angle + PI) % 2 * PI) < 0.0001)+ && !(fabs (l.angle - r.angle) < 0.0001)) { return false; } }@@ -1710,7 +1716,7 @@ public class StrokeTool : Tool { p2 = path.points.get ((i + 1) % path.points.size); p3 = path.points.get ((i + 2) % path.points.size); - tolerance = 1.2 / sqrt (stroke_width);+ tolerance = 0.13 / sqrt (stroke_width); step_increment = 1.1; step_size = 0.039 / stroke_width;