Open GoogleCodeExporter opened 9 years ago
I am seeing the linearGradient problem in my SVG as well. The problem is that
the patch to fix issue 6 added some code to completely ignore the <defs>
section of the SVG. It is not clear why this was done. But since the <defs>
section is ignored and the gradient is defined in the <defs> section, the
gradient cannot be applied because it is effectively unknown to the parser.
Original comment by sc...@mobiata.com
on 17 Jan 2012 at 9:21
My naive solution would be to just delete all lines in the code that are
related to the variable inDefsElement, but again, since it is not clear to me
why that code was added in the first place, I'm not sure if that would have
unintended consequences.
Original comment by sc...@mobiata.com
on 17 Jan 2012 at 9:26
[deleted comment]
I added that code to ignore the defs section to not draw definitions of objects
to be drawn with "use" tags. As an example, take the europe flag on wikipedia.
The solution could be moving the "if (inDefElement) {return;}" after having
parsed gradients.
Doing so, the file cannot be parsed because there is not the attribute
xmlns:xlink="http://www.w3.org/1999/xlink" into the <svg> tag (I think it's an
error in the file).
Fixing the file, the feed icon does not render at all in this case because of
another bug: when the "style" attribute is missing there is a
NullPointerException.
Fixing even this, the render is identical to the one you posted: the kind of
gradient used is not yet supported.
Original comment by neclep...@gmail.com
on 6 Feb 2012 at 10:41
Fixes some bugs involving gradients (ignoring defs, colors with 3 digits, empty
style tag). Still does not render wikipedia RSS icon well.
(Patch file gets confused by large code moving around, and I have an error when
trying to suggest the patch, so I post the full file.)
Original comment by neclep...@gmail.com
on 6 Feb 2012 at 11:10
Attachments:
Original issue reported on code.google.com by
nadie...@gmail.com
on 18 Dec 2011 at 11:50Attachments: