The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Handle a both sides of guides

These changes was commited to the Birdfont repository Sun, 28 Jun 2015 11:26:39 +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, 28 Jun 2015 11:26:39 +0000]

Updated Files

libbirdfont/Line.vala
--- a/libbirdfont/Line.vala +++ b/libbirdfont/Line.vala @@ -215,7 +215,9 @@ } if (is_vertical ()) { // over line handle (y) - if (y > g.allocation.height - 10) { + if (y > g.allocation.height - 10 * MainWindow.units + || y < 10 * MainWindow.units) { + p = pos; c = Glyph.path_coordinate_x (x); a = (p - margin * ivz <= c <= p + margin * ivz); @@ -228,7 +230,9 @@ set_active (a); } else { // over line handle (x) - if (x > g.allocation.width - 10) { + if (x > g.allocation.width - 10 * MainWindow.units + || x < 10 * MainWindow.units) { + p = pos; c = Glyph.path_coordinate_y (y); a = (p - margin * ivz <= c <= p + margin * ivz); @@ -360,7 +364,14 @@ cr.line_to (p + size, h); cr.close_path(); cr.fill (); - + + cr.new_path (); + cr.move_to (p - size, 0); + cr.line_to (p, size); + cr.line_to (p + size, 0); + cr.close_path(); + cr.fill (); + if (get_active ()) { glyph_metrics = new Text (metrics, 17); Theme.text_color (glyph_metrics, "Highlighted Guide"); @@ -383,6 +394,13 @@ cr.move_to (w, p - size); cr.line_to (w - size, p); cr.line_to (w, p + size); + cr.close_path(); + cr.fill (); + + cr.new_path (); + cr.move_to (0, p - size); + cr.line_to (0 + size, p); + cr.line_to (0, p + size); cr.close_path(); cr.fill (); }