Incorrect rendering of radial gradients
Bug #913431 reported by
Alexandre Prokoudine
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Invalid
|
High
|
Unassigned |
Bug Description
The report is coming from Andrey Bayrak of SVG Cleaner team.
According to SVG standard, default values for cx, cy and r elements for radialGradients is 50%. To quote it: “If the attribute is not specified, the effect is as if a value of '50%' were specified.”
That means if cx and cy are 1/2 of viewBox's width and height, they can be safely wiped during optimization. E.g. Firefox will render such an optimized SVG file just fine, but Inkscape won't.
Andrey illustrates that with two attached files: database-bug.svg is the optimized version of database-normal.svg and has the cx="64" attribute removed from lines 112 and 114.
Difference in rendering reproduced with Inkscape 0.48.2 and 0.48+devel r10860 on OS X Lion,
compared to how Firefox 9 and Chromium 18 render the file
Note:
- while Opera 11.6 and Squiggle (Batik 1.7) also appear to render the two versions identically, they do not agree with Firefox and Chromium about how to render the radial gradients of the stacked objects in the background.
- rsvg-view doesn't render the objects stacked in the background, and also shows a difference (in the background) between the two versions.
Any chance to get a more reduced test case?
<off-topic> www.w3. org/TR/ SVG11/struct. html#SVGElement VersionAttribut e>
BTW - Squiggle (Batik 1.7) initially refused to open both SVG files with the error message
Unsupport SVG version '1'
Changing 'version="1"' to 'version="1.0"' fixed that.
<http://
</off-topic>