Re: Problem with clip and svg output

Pétiard François <[email protected]> Fri, 4 Nov 2022 16:55:52 +0100
Newsgroups gmane.comp.tex.metapost
Message-ID <[email protected]>
Le 04/11/2022 à 15:49, luigi scarso a écrit :

>
>
> On Fri, 4 Nov 2022 at 15:31, Pétiard François 
> <[email protected]> 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

--
http://tug.org/metapost/
clip_with_Firefox.png (image/png, 22.6 KB) - not displayed