The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Set color for selected strokes

These changes was commited to the Birdfont repository Fri, 01 May 2015 07:41:50 +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>
Fri, 01 May 2015 07:41:50 +0000 (09:41 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 01 May 2015 07:41:50 +0000 (09:41 +0200)
commit 5a02ce729c7a66f643e2c367af21089262a7d437
tree 41f8fe61f7ac6091aa98ffa6bad5c6a8023d25e8
parent b69e2e1d3ea1e3d73d5f8b5a9180c67fb03c53b0
Set color for selected strokes

libbirdfont/Glyph.vala
--- a/libbirdfont/Glyph.vala +++ b/libbirdfont/Glyph.vala @@ -1534,12 +1534,22 @@ if (p.is_editable ()) { color = Theme.get_color ("Filled Stroke"); color.a = 0.8; - } else if (active_paths.index_of (p) > -1) { - color = Theme.get_color ("Selected Objects"); } else { color = Color.black (); } + draw_path_list (stroke, cr, color); + } + } + cr.fill (); + cr.restore (); + + cr.save (); + cr.new_path (); + foreach (Path p in active_paths) { + if (p.stroke > 0) { + stroke = p.get_stroke_fast (); + color = Theme.get_color ("Selected Objects"); draw_path_list (stroke, cr, color); } }