ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Radial gradient stops in SVG images
@ 2021-03-28 23:47 Thangalin
  2021-03-29 11:23 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Thangalin @ 2021-03-28 23:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1273 bytes --]

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!

[-- Attachment #1.2: Type: text/html, Size: 2019 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Radial gradient stops in SVG images
  2021-03-28 23:47 Radial gradient stops in SVG images Thangalin
@ 2021-03-29 11:23 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2021-03-29 11:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Thangalin

On 3/29/2021 1:47 AM, Thangalin wrote:
> 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.
no support for gradientUnits yet


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-29 11:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-28 23:47 Radial gradient stops in SVG images Thangalin
2021-03-29 11:23 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).