<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 9 Jan 2023 at 16:33, Lutz Haseloff <<a href="mailto:lutz.haseloff@toppkieker.info">lutz.haseloff@toppkieker.info</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u><div>Hi all,<br><br>the svg output of recent metapost (linux and windows) seems to be clipped or the viewbox of the svg is shifted a small amount down and right.<br><br>My <a href="http://test.mp" target="_blank">test.mp</a> is:<br><br>outputformat := "svg";<br>outputtemplate := "%j.%{outputformat}";<br>beginfig(1)<br>draw fullcircle scaled 20;<br>endfig;<br>end<br><br>The resulting svg included in a context lmtx file:<br><br>\starttext<br>\startTEXpage<br>\externalfigure[test.svg][conversion=mp]<br>\stopTEXpage<br>\stoptext<br><br>eps and png output is ok.<br><br>Has it to do with the recent change in the svg clippath?<br>Am I doing something wrong?<br><br>Greetings<br><br>Lutz</div>--<br>
<a href="http://tug.org/metapost/" rel="noreferrer" target="_blank">http://tug.org/metapost/</a></blockquote><div><br></div><div>hm, I think we should consider the pen; fig 1 is almost ok without shift because the pen is very thin;</div><div>fig 2 is ok only if I shift the fullcircle of half pen :</div><div><br></div><div>outputformat := "svg";<br>outputtemplate := "%j-%c.%{outputformat}";<br>beginfig(1)<br>pickup pencircle scaled 0.01;<br>draw fullcircle scaled 20 ; <br>draw (10,-10)--(10,10)--(-10,10)--(-10,-10)--(10,-10) withpen pencircle scaled 0.01 withcolor red;<br>endfig;<br>beginfig(2)<br>pickup pencircle scaled 1;<br>draw fullcircle scaled 20 shifted (0.5,-0.5);<br>draw (10,-10)--(10,10)--(-10,10)--(-10,-10)--(10,-10) withpen pencircle scaled 0.01 withcolor red;<br>endfig;<br>end<br></div><div> </div><div>--</div><div>luigi</div></div></div>