Referenced linearGradient is not rendered properly

Bug #1167689 reported by 张海
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Medium
Unassigned

Bug Description

Attributes defined on the referenced linearGradient are not properly inherited by the new linearGradient, which is rendered strangely.

----------------------------------------
File Inkscape_LinearGradient.svg

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="128" height="128">
 <defs>
  <linearGradient id="linearGradient1" gradientUnits="userSpaceOnUse" x1="" y1="0" x2="0" y2="128">
   <stop stop-color="#8392de" offset="0"/>
   <stop stop-color="#9ce7fd" offset="1"/>
  </linearGradient>
  <linearGradient id="linearGradient2" xlink:href="#linearGradient1"/>
 </defs>
 <rect x="0" y="0" width="128" height="128" fill="url(#linearGradient2)" stroke="none"/>
</svg>
----------------------------------------

The image rendered by Inkscape has a 1-pixel-wide border with the first color on the left, while the rest is filled by the other color.(See attachment)
This file can be render normally on my computer with Google Chrome 26(i.e. Webkit).
If I place the attributes in linearGradient2, the image behaves correctly again.

----------------------------------------
W3C Recommendation

http://www.w3.org/TR/SVG/pservers.html
...
13.2.2 Linear gradients
...
xlink:href = "<iri>"
...
Any ‘linearGradient’ attributes which are defined on the referenced element which are not defined on this element are inherited by this element.
...

Tags: gradient
Revision history for this message
张海 (zhanghai) wrote :
su_v (suv-lp)
tags: added: gradient
removed: attribute inherit lineargradient render
Revision history for this message
su_v (suv-lp) wrote :

Reproduced with Inkscape 0.48.4 and 0.48+devel r12274 on OS X 10.7.5, rendering of attached sample SVG file in Inkscape compared to Squiggle (Batik 1.7), librsvg 2.36.4, Opera 12.14, Firefox 19.0.2.

Revision history for this message
su_v (suv-lp) wrote :

Attaching modified sample file with attributes specified for the actually referenced gradient (as explained by the reporter), for ease of testing.

Changed in inkscape:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Beluga (buovjaga) wrote :

Still confirmed with 1167689-linearGradient-1.svg

Arch Linux 64-bit, KDE Plasma 5
Inkscape 0.92+devel 15099 (GTK3)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.