[metapost] Problem with clip and svg output

Pétiard François petiard.francois at free.fr
Fri Nov 4 16:55:52 CET 2022


Le 04/11/2022 à 15:49, luigi scarso a écrit :

>
>
> On Fri, 4 Nov 2022 at 15:31, Pétiard François 
> <petiard.francois at free.fr> wrote:
>
>     Hello
>
>     the eps and the png output are correct but not the svg output (the
>     clip
>     is rectangular, not round).
>
>
> this is what I see  from my (buggy) inkscape 1.2.1
>
> --
> luigi

OK, I see also the same in Inkscape.

But this is what I see in Firefox and Edge

And that svg file

<?xml version="1.0"?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" 
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100">
   <clipPath id="myClip">
     <circle cx="40" cy="35" r="35" />
   </clipPath>
   <path id="heart" d="M10,30 A20,20,0,0,1,50,30 A20,20,0,0,1,90,30 
Q90,60,50,90 Q10,60,10,30 Z" />
   <use clip-path="url(#myClip)" href="#heart" fill="red" />
</svg>

is displayed correctly in Firefox and Edge

???

Best regards

François
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/metapost/attachments/20221104/ee407982/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clip_with_Firefox.png
Type: image/png
Size: 23125 bytes
Desc: not available
URL: <https://tug.org/pipermail/metapost/attachments/20221104/ee407982/attachment-0001.png>


More information about the metapost mailing list.