The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – 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
[Sun, 06 Mar 2016 09:30:41 +0000]

Updated Files

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