The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Stroke with for ellipse in SVG rendering

These changes was commited to the Birdfont repository Sun, 10 Jan 2016 23:25:28 +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, 10 Jan 2016 23:25:28 +0000]

Updated Files

libsvgbird/Ellipse.vala
libsvgbird/SvgStyle.vala
--- a/libsvgbird/Ellipse.vala +++ b/libsvgbird/Ellipse.vala @@ -43,6 +43,9 @@ cr.translate (cx + rx, cy + ry); cr.scale (rx, ry); cr.arc (0, 0, 1, 0, 2 * Math.PI); + cr.restore (); + + cr.save (); apply_transform (cr); paint (cr); cr.restore ();
--- a/libsvgbird/SvgStyle.vala +++ b/libsvgbird/SvgStyle.vala @@ -57,15 +57,11 @@ s = style.get ("stroke") != "none"; } - return get_stroke_width () > 0 && s; + return stroke_width > 0 && s; } public double get_stroke_width () { - if (!style.has_key ("stroke-width")) { - return 0; - } - - return double.parse (style.get ("stroke-width")); + return stroke_width; } public static SvgStyle parse (Defs? d, SvgStyle inherited, Attributes attributes) {