The Birdfont Source Code


All Repositories / birdfont.git / blobdiff – RSS feed

Merge branch 'master' of github.com:johanmattssonm/birdfont

Changes made to libbirdfont/Path.vala

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
--- libbirdfont/Path.vala +++ libbirdfont/Path.vala @@ -754,18 +754,20 @@ } /** Resize path relative to bottom left coordinates. */ - public void resize (double ratio) { + public void resize (double ratio_x, double ratio_y) { foreach (EditPoint p in points) { - p.x *= ratio; - p.y *= ratio; - p.right_handle.length *= ratio; - p.left_handle.length *= ratio; + p.independent_x *= ratio_x; + p.independent_y *= ratio_y; + p.get_right_handle ().independent_x *= ratio_x; + p.get_right_handle ().independent_y *= ratio_y; + p.get_left_handle ().independent_x *= ratio_x; + p.get_left_handle ().independent_y *= ratio_y; } - xmin *= ratio; - xmax *= ratio; - ymin *= ratio; - ymax *= ratio; + xmin *= ratio_x; + xmax *= ratio_x; + ymin *= ratio_y; + ymax *= ratio_y; } public void scale (double scale_x, double scale_y) {