The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Remove debug code

These changes was commited to the Birdfont repository Fri, 03 Jul 2015 19:07:26 +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, 03 Jul 2015 19:07:26 +0000 (21:07 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 03 Jul 2015 19:08:26 +0000 (21:08 +0200)
commit 5b9b8f69d9e6459778d38500292c9e84b5529641
tree 3611341d850f6db16b1c155a5a21c056da7ddd60
parent 62bf11fd4387a264e172be8b24d846e1c88cfbf4
Remove debug code

libbirdfont/Path.vala
libbirdfont/StrokeTool.vala
--- a/libbirdfont/Path.vala +++ b/libbirdfont/Path.vala @@ -1446,7 +1446,6 @@ sp = prev; if (skip_previous == sp && skip_next == si) { - print ("SKIP IN get_closest_point_on_path\n"); continue; } }
--- a/libbirdfont/StrokeTool.vala +++ b/libbirdfont/StrokeTool.vala @@ -136,24 +136,16 @@ lep.flags |= EditPoint.SELF_INTERSECTION; lep2.flags |= EditPoint.SELF_INTERSECTION; - - lep.color = Color.pink (); - lep2.color = Color.pink (); lep.tie_handles = false; lep.reflective_point = false; lep2.tie_handles = false; - lep2.reflective_point = false; - - print (@"SELF INTERSECTION AT $(ep.x) $(ep.y) $(ep.get_prev ().x), $(ep.get_prev ().y)\n"); + lep2.reflective_point = false; } else { pp.insert_new_point_on_path (lep); lep.flags |= EditPoint.INTERSECTION; lep.tie_handles = false; lep.reflective_point = false; - - lep.color = Color.magenta (); - print (@"INTERSECTION AT $(ep.x) $(ep.y)\n"); } } } @@ -178,12 +170,6 @@ foreach (Path pp in o.paths) { pp.remove_deleted_points (); - } - - //FIXME:DELETE - - foreach (Path pp in o.paths) { - ((!) BirdFont.get_current_font ().get_glyph_by_name ("a")).add_path (pp.copy ()); } o = merge_curves (o, flat); @@ -224,7 +210,7 @@ return pl; } - r = merge_paths_with_curves (pl.paths.get (0), pl.paths.get (1), flat); + r = merge_paths_with_curves (pl.paths.get (0), pl.paths.get (1)); remove_curves_inside (r); return r; @@ -246,8 +232,6 @@ bool cp = Path.is_counter (flat, p); if (c > 1) { - //FIXME: delete - print (@"$(p.points.size) $c $(p.is_clockwise ()) $cp\n"); if (c % 2 != 0) { // path is always inside the outline in flat if (!p.is_clockwise ()) { remove.add (p); @@ -278,8 +262,7 @@ } } - // FIXME: remove flat - static PathList merge_paths_with_curves (Path path1, Path path2, PathList flat) { + static PathList merge_paths_with_curves (Path path1, Path path2) { PathList r = new PathList (); IntersectionList intersections = new IntersectionList (); EditPoint ep1, ep2, found; @@ -373,10 +356,6 @@ Intersection intersection = new Intersection (ep1, path1, found, path2); intersections.points.add (intersection); } - } - - foreach (Intersection inter in intersections.points) { - print (@"inter: $inter\n"); } // reset copied points @@ -404,15 +383,11 @@ find_parts = true; new_start = inter; current = new_start.path; - print (@"new_start: $new_start\n"); break; } } if (new_path.points.size > 0) { - new_path.get_first_point ().color = Color.green (); - new_path.get_last_point ().color = Color.yellow (); - new_path.get_last_point ().get_prev ().color = Color.blue (); new_path.close (); new_path.recalculate_linear_handles (); r.add (new_path); @@ -441,7 +416,6 @@ Intersection self_intersection_point = new Intersection.empty (); while (true) { if ((ep1.flags & EditPoint.INTERSECTION) > 0) { - print ("intersection.\n"); bool other; previous = ep1; @@ -463,9 +437,6 @@ Path.get_point_for_step (ep1, ep2, 0.5, out px, out py); // FIXME: for merging outline with counters - - print (@"Path1 $(current == path1) && $(flat2.is_over_coordinate (px, py)) $(ep1.x), $(ep1.y)\n"); - print (@"Path2 $(current == path2) && $(flat1.is_over_coordinate (px, py))\n"); bool inside = (current == path1 && flat2.is_over_coordinate (px, py)) || (current == path2 && flat1.is_over_coordinate (px, py)); @@ -474,7 +445,6 @@ || (current != path2 && flat1.is_over_coordinate (px, py)); if (inside && !other_inside) { - print (@"Middle point is inside $px $py\n"); current = new_start.get_other_path (current); i = index_of (current, new_start.get_point (current)); @@ -485,26 +455,18 @@ new_start.done = true; ep1 = current.points.get (i); - } else { - print (@"Outside $px $py\n"); - } + } inside = (current == path1 && flat2.is_over_coordinate (px, py)) || (current == path2 && flat1.is_over_coordinate (px, py)); if (first) { previous = new_start.get_other_path (current).get_first_point (); - // FIXME: DELETE previous = new_start.get_other_point (current); first = false; } - - print (@"ep1.left_handle.move_to_coordinate ($(previous.left_handle.x), $(previous.left_handle.y);\n"); - print (@"ep1.left_handle.move_to_coordinate $(ep1 == previous) ($(ep1.left_handle.x), $(ep1.left_handle.y);\n"); - print (@"$(ep1)\n$(previous)\n"); } if ((ep1.flags & EditPoint.SELF_INTERSECTION) > 0) { - print ("self intersection.\n"); bool other; new_start = intersections.get_point (ep1, out other); i = index_of (current, other ? new_start.point : new_start.other_point); @@ -523,8 +485,6 @@ ep1 = current.points.get (i); } else if ((ep1.flags & EditPoint.COPIED) > 0) { - print ("Copied, part done.\n"); - new_path.close (); EditPoint first_point = new_path.get_first_point (); EditPointHandle h; @@ -534,14 +494,12 @@ if (first_point.next != null) { h = first_point.get_next ().get_left_handle (); h.process_connected_handle (); - //h.move_to (0,0); } } break; } - - print ("add\n"); + ep1.flags |= EditPoint.COPIED; new_path.add_point (ep1.copy ()); @@ -1846,14 +1804,10 @@ foreach (EditPoint ep in path.points) { if (!is_inside (ep, p)) { inside = false; - // FIXME: DELETE - print (@"OUTSIDE: $(ep.to_string ())\n"); - ((!) BirdFont.get_current_font ().get_glyph_by_name ("b")).add_path (path); break; } } - print (@"inside: $inside $(p.points.size) $(path.points.size)\n"); if (inside) { inside_count++; }