Problem with clip and svg output
Pétiard François <[email protected]> Fri, 4 Nov 2022 15:30:52 +0100
| Newsgroups | gmane.comp.tex.metapost |
|---|---|
| Message-ID | <[email protected]> |
Hello
With that file:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
prologues:=3;
outputtemplate:="%j_%c.%{outputformat}";
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%% EPS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
outputformat:="eps";
u:=1bp;
beginfig(1);
for i=-12 upto 2:
draw u*(2*i,-10)--u*(2*i+20,10);
endfor;
clip currentpicture to fullcircle scaled(20u);
draw fullcircle scaled(20u);
endfig;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%% SVG %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
outputformat:="svg";
u:=5bp;
beginfig(1);
for i=-12 upto 2:
draw u*(2*i,-10)--u*(2*i+20,10);
endfor;
clip currentpicture to fullcircle scaled(20u);
draw fullcircle scaled(20u);
endfig;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%% PNG %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
outputformat:="png";
u:=10bp;
outputformatoptions:="format=rgba antialias=best";
beginfig(1);
for i=-12 upto 2:
draw u*(2*i,-10)--u*(2*i+20,10);
endfor;
clip currentpicture to fullcircle scaled(20u);
draw fullcircle scaled(20u);
endfig;
end;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
the eps and the png output are correct but not the svg output (the clip
is rectangular, not round).
Is it normal (limitation of svg, for example) ?
Best regards
François Pétiard
--
http://tug.org/metapost/