Bug 2909 - Gradient render error
Summary: Gradient render error
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: images (show other bugs)
Version: all
Hardware: PC All
: P3 major
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
: 22101 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-07-30 18:47 UTC by gary
Modified: 2012-04-01 06:53 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gary 2001-07-30 18:47:13 UTC
There appears to be a problem when using the SVG 'linearGradient' 
and 'radialGradient' functions. The image appears, however there is no colour 
rendering - just black.

The problem occurs when using either an external SVG file using <fo:external-
graphic src="..."> or inline using <fo:instream-foreign-object>.

The SVG works fine using a SVG viewer.

The latest version of FOP (0.19) is being used on a Windows NT platform.

Any help would be appreciated.

Sample xsl:
-----------

<fo:block space-before=".2cm" color="green">
  fo:external-graphic SVG Test
</fo:block>

<fo:block space-before=".2cm">
  <fo:external-graphic src="file:linearTest.svg"/>
</fo:block>

<fo:block space-before=".2cm" color="red">
  fo:instream-foreign-object SVG Test
</fo:block>

<fo:instream-foreign-object>
  <svg:svg width="200px" height="50px" >
    <svg:g>
      <svg:defs>
        <svg:linearGradient id="BarGradient" >
           <svg:stop offset="0%"  	stop-color="green"/>
           <svg:stop offset="50%"	stop-color="yellow"/>
           <svg:stop offset="100%"	stop-color="red"/>
        </svg:linearGradient>
      </svg:defs>
      <svg:rect x="0" y="0" width="125" height="25" fill="url(#BarGradient)" />
    </svg:g>
  </svg:svg>
</fo:instream-foreign-object>

SVG xml:
--------

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN"
"http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd">

<svg width="125" height="25" xml:space="preserve">
  <g>
    <defs>
      <linearGradient id="BarGradient" >
        <stop offset="0%"  	stop-color="green"/>
        <stop offset="50%"	stop-color="yellow"/>
        <stop offset="100%"	stop-color="red"/>
      </linearGradient>
    </defs>
    <rect x="0" y="0" width="125" height="25" fill="url(#BarGradient)" />
  </g>
</svg>
Comment 1 J.Pietschmann 2003-08-04 08:32:39 UTC
*** Bug 22101 has been marked as a duplicate of this bug. ***
Comment 2 Pascal Sancho 2007-10-23 07:01:27 UTC
This works for me in latest Trunk (rev 584703), and probably in FOP 0.94
Comment 3 Glenn Adams 2012-04-01 06:53:26 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed