The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Use grid in Beziér tool

These changes was commited to the Birdfont repository Fri, 08 May 2015 20:16:08 +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, 08 May 2015 20:16:08 +0000]

Updated Files

libbirdfont/BezierTool.vala
libbirdfont/PenTool.vala
--- a/libbirdfont/BezierTool.vala +++ b/libbirdfont/BezierTool.vala @@ -130,6 +130,10 @@ px = Glyph.path_coordinate_x (x); py = Glyph.path_coordinate_y (y); + + if (GridTool.is_visible ()) { + GridTool.tie_coordinate (ref px, ref py); + } if (state == NONE) { g.open_path (); @@ -211,6 +215,11 @@ px = Glyph.path_coordinate_x (x); py = Glyph.path_coordinate_y (y); + + if (GridTool.is_visible ()) { + GridTool.tie_coordinate (ref px, ref py); + } + g = MainWindow.get_current_glyph (); if (state == MOVE_HANDLES) { @@ -248,7 +257,11 @@ px = Glyph.path_coordinate_x (x); py = Glyph.path_coordinate_y (y); - + + if (GridTool.is_visible ()) { + GridTool.tie_coordinate (ref px, ref py); + } + if (state == MOVE_POINT) { current_point.x = px; current_point.y = py;
--- a/libbirdfont/PenTool.vala +++ b/libbirdfont/PenTool.vala @@ -161,10 +161,6 @@ x = Glyph.path_coordinate_x (ix); y = Glyph.path_coordinate_y (iy); - - if (active_edit_point == null) print ("NULL\n"); - else print ("NOT NULL\n"); - if (has_join_icon () && active_edit_point != null) { join_paths ((!) active_edit_point); }