The Birdfont Source Code


All Repositories / birdfont.git / commit – 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
author Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 08 May 2015 20:16:08 +0000 (22:16 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 08 May 2015 20:16:08 +0000 (22:16 +0200)
commit 4f687a5c1da629ecb961d4d01bb41d607248a39b
tree e912e86355b8588261812953bf59e5c2746b0edc
parent 9eaa2c9e1bbf15c0276f5d686fcd07b30f9f9226
Use grid in Beziér tool

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); }