Commit 2a621ee
Ignore case in gradient URL Inkscape requires this.
Changed files (4)
modifiedlibbirdfont/MoveTool.valamodifiedlibsvgbird/Defs.valamodifiedlibsvgbird/SvgDrawing.valamodifiedlibsvgbird/SvgStyle.vala
Diff
@@ -286,22 +286,22 @@ public class MoveTool : Tool { if (o is PathObject) { Path p = ((PathObject) o).get_path (); p.update_region_boundaries ();- - if (px > p.xmin) {- px = p.xmin;- } + }+ + if (px > o.xmin) {+ px = o.xmin;+ } - if (py > p.ymin) {- py = p.ymin;- }+ if (py > o.ymin) {+ py = o.ymin;+ } - if (px2 < p.xmax) {- px2 = p.xmax;- }- - if (py2 < p.ymax) {- py2 = p.ymax;- }+ if (px2 < o.xmax) {+ px2 = o.xmax;+ }+ + if (py2 < o.ymax) {+ py2 = o.ymax; } } @@ -93,10 +93,12 @@ public class Defs { tag_id = id; } + tag_id = tag_id.down ();+ foreach (Gradient gradient in gradients) {- if (gradient.id == tag_id) {+ if (gradient.id.down () == tag_id) { return gradient;- }+ } } return null; @@ -35,11 +35,47 @@ public class SvgDrawing : Object { svg_width = value; } }- public double svg_width = 0; + public double svg_width = 0; public double height = 0;++ public override double xmin {+ get {+ return x;+ }++ set {+ }+ }++ public override double xmax {+ get {+ return x + width;+ }+ + set {+ }+ }++ public override double ymin {+ get {+ return y;+ } + set {+ }+ }++ public override double ymax {+ get {+ return y + height;+ }+ + set {+ }+ }+ public override void update_region_boundaries () { } @@ -228,8 +228,10 @@ public class SvgStyle : GLib.Object { if (d != null) { Defs defs = (!) d; + print (s.style.get ("fill") + "\n");+ s.stroke_gradient = defs.get_gradient_for_url (s.style.get ("stroke"));- s.fill_gradient = defs.get_gradient_for_url (s.style.get ("fill"));+ s.fill_gradient = defs.get_gradient_for_url (s.style.get ("fill")); } if (s.fill != null) {