The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix rotation handle

These changes was commited to the Birdfont repository Sun, 06 Mar 2016 09:30:41 +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>
Sun, 06 Mar 2016 09:30:41 +0000 (10:30 +0100)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 06 Mar 2016 09:30:41 +0000 (10:30 +0100)
commit 81f36f2c147adc67e269634ef8ee254a7eb178a5
tree 14045321d0ffbbc51210093142b320cbc13bb4fc
parent d2e1798fdb1c69d6668a8a1a50713540955396d3
Fix rotation handle

libbirdfont/ResizeTool.vala
--- a/libbirdfont/ResizeTool.vala +++ b/libbirdfont/ResizeTool.vala @@ -255,13 +255,15 @@ if (glyph.active_paths.size > 0) { last_path = glyph.active_paths.get (glyph.active_paths.size - 1); - rotation = last_path.rotation; if (rotation > PI) { rotation -= 2 * PI; } - last_rotate = rotation; + if (last_rotate > PI) { + last_rotate -= 2 * PI; + } + signal_objects_rotated (); } } @@ -315,8 +317,8 @@ cr.rectangle (cx - 2.5, cy - 2.5, 5, 5); cr.fill (); - hx = cos (rotation) * get_rotated_handle_length (); - hy = sin (rotation) * get_rotated_handle_length (); + hx = cos (last_rotate) * get_rotated_handle_length (); + hy = sin (last_rotate) * get_rotated_handle_length (); cr.set_line_width (1); cr.move_to (cx, cy);