Commit 5949cad
Use the SVG stroke style
Changed files (3)
Diff
@@ -22,6 +22,7 @@ packages with a -dev or -devel affix: python-gtk2-dev libwebkitgtk-3.0-dev libnotify-dev+ libsqlite3-dev unicode-data (unicode character database) BirdFont have two build systems, one python script that builds all@@ -534,7 +534,12 @@ public class SvgParser { pl.paths.append (path_list); foreach (Path p in path_list.paths) {- p.stroke = style.get_stroke_width ();+ if (style.has_stroke ()) {+ p.stroke = style.get_stroke_width ();+ } else {+ p.stroke = 0;+ }+ p.line_cap = style.get_line_cap (); p.reset_stroke (); p.update_region_boundaries (); @@ -43,6 +43,16 @@ public class SvgStyle { return LineCap.BUTT; } + public bool has_stroke () {+ bool s = true;+ + if (style.has_key ("stroke")) {+ s = style.get ("stroke") != "none";+ }+ + return get_stroke_width () > 0 && s;+ }+ public double get_stroke_width () { if (!style.has_key ("stroke-width")) { return 0;