[NTG-context] Radial gradient stops in SVG images

Thangalin thangalin at gmail.com
Mon Mar 29 01:47:16 CEST 2021


In the latest release, SVG radial gradients appear to apply colour stops as
solid black. Removing the <stop> elements produces a solid colour, but
without a radial gradient.

Hans may be aware of the issue. Meanwhile, here's an MWE.

Save as gradient.svg:

<!-- SOF -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 215.9 279.4"
height="1056" width="816"><defs><radialGradient r="153.278" fy="276.602"
fx="101.83" cy="276.602" cx="101.83"
gradientTransform="matrix(0.41308681,-4.1069042e-8,4.7549103e-8,0.47826553,59.765073,10.270449)"
id="A" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f9f9f9"
stop-opacity="0"/><stop offset="1" stop-color="#4c1300"
stop-opacity=".26"/></radialGradient></defs><g fill-rule="evenodd"><path
d="M.127.127h215.646v279.146H.127z" fill="#f8da95"/><path d="M10.54
38.525h182.579v208.07H10.54z" fill="url(#A)" opacity=".75"/></g></svg>
<!-- EOF -->

Save as gradient.tex:

% SOF
\starttext
  \placefigure{}{\externalfigure[gradient.svg][conversion=mp]}
\stoptext
% EOF

Expected: A light-brown, translucent, radial gradient region appears on the
page.

Actual: A solid, opaque, black region appears on the page.

Environment:

Xubuntu Linux 5.8.0-48 (clean install on VirtualBox)
ConTeXt version 2021.03.27 19:09

Cheers!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20210328/24989629/attachment.htm>


More information about the ntg-context mailing list