The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix image selection offset

These changes was commited to the Birdfont repository Sun, 08 Mar 2015 08:40:52 +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, 08 Mar 2015 08:40:52 +0000 (09:40 +0100)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 08 Mar 2015 08:40:52 +0000 (09:40 +0100)
commit 84a052f022ce947ab595d7c3400983cd280a7d63
tree a67f04c1288d002e0b7fe669892520ca50f86114
parent 77b5d44708b791bbff6f920424a00bef20ba8f88
Fix image selection offset

libbirdfont/BackgroundImage.vala
libbirdfont/BackgroundSelection.vala
libbirdfont/BackgroundTools.vala
--- a/libbirdfont/BackgroundImage.vala +++ b/libbirdfont/BackgroundImage.vala @@ -631,8 +631,8 @@ cr.fill (); cr.set_line_width (ivz); - cr.move_to (x + 2.5* ivz, y + 2.5* ivz); - cr.line_to (x2 + 2.5* ivz, y2 + 2.5* ivz); + cr.move_to (x + 2.5 * ivz, y + 2.5 * ivz); + cr.line_to (x2 + 2.5 * ivz, y2 + 2.5 * ivz); cr.stroke (); cr.restore ();
--- a/libbirdfont/BackgroundSelection.vala +++ b/libbirdfont/BackgroundSelection.vala @@ -26,7 +26,7 @@ } set { - x_img = value / parent_image.img_scale_x - parent_image.img_middle_x; + x_img = (value - parent_image.img_middle_x) / parent_image.img_scale_x; } }
--- a/libbirdfont/BackgroundTools.vala +++ b/libbirdfont/BackgroundTools.vala @@ -137,6 +137,7 @@ set_default_canvas (); Toolbox.redraw_tool_box (); GlyphCanvas.redraw (); + return false; }); idle.attach (null);