<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 18 Jan 2023 at 12:53, 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">
<div>
<p>Hi Luigi,</p>
<p>I tested a bit further.</p>
<p>MP:</p>
<p>outputformat := "svg";<br>
outputtemplate := "%j-%c.%{outputformat}";<br>
beginfig(19)<br>
fill fullcircle scaled 19 withcolor red ;<br>
endfig;<br>
end<br>
</p>
<p>SVG:</p>
<p><?xml version="1.0"?><br>
<!-- Created by MetaPost 2.02 on 2023.01.18:1229 --><br>
<svg version="1.1" xmlns=<a href="http://www.w3.org/2000/svg" target="_blank">"http://www.w3.org/2000/svg"</a>
xmlns:xlink=<a href="http://www.w3.org/1999/xlink" target="_blank">"http://www.w3.org/1999/xlink"</a> width="19.000000"
height="19.000000" viewBox="0 0 19.000000 19.000000"><br>
<!-- Original BoundingBox: -9.500000 -9.500000 9.500000
9.500000 --><br>
<path d="M18.500000 9.000000 (should be 19.0 9.5) ...
11.519557 -0.500000 (should be 0) ... -0.500000 9.000000 (should
be 0) ... ,18.500000 9.000000Z" style="fill:
rgb(100.000000%,0.000000%,0.000000%);stroke:
none;"></path><br>
</svg><br>
</p>
<p>It seems, that the path d is not correctly transformed from the
ps hires boundingbox (-9.5 -9.5 9.5 9.5) to the svg viewbox (0 0
19 19).</p>
<p>With even sizes ( say 20) it works ok.</p>
<p><br></p></div></blockquote><div><br></div><div>indeed, I was looking at it ... this evening can check it better</div><div><br></div><div>--</div><div>luigi</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p>
</p>
<p>Greetings Lutz<br>
</p>
<p><br>
</p>
<div>Am 15.01.2023 um 15:01 schrieb luigi
scarso:<br>
</div>
<blockquote type="cite">
<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" target="_blank">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">
<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>
</blockquote>
</div>
--<br>
<a href="http://tug.org/metapost/" rel="noreferrer" target="_blank">http://tug.org/metapost/</a></blockquote></div></div>