[cairo] forward references in libsvg

Keith Packard keithp at keithp.com
Sun Jun 19 02:07:43 PDT 2005


libsvg doesn't handle forward references in xlink:href properties:

 <defs>
  <radialGradient
    r="10" fy="0" fx="0" cy="0" cx="0" id="radial"
    xlink:href="#linear"/>
  <linearGradient id="linear">
    <stop offset="0" style="stop-color:#ffffff"/>
    <stop offset="1" style="stop-color:#ff0000"/>
  </linearGradient>
 </defs>

This doesn't work (and, in fact, causes a segfault in the PDF backend)
as the radialGradient attempts to reference the
later linearGradient element.  Because the linearGradient
isn't defined when the radialGradient is parsed, the xlink:href is not
resolved and the radialGradient is given
no stops.

-keith

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050619/8e7bb342/attachment.pgp


More information about the cairo mailing list