<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <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 class="moz-txt-link-rfc2396E" href="http://www.w3.org/2000/svg">"http://www.w3.org/2000/svg"</a>
      xmlns:xlink=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/xlink">"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>
    <p>Greetings Lutz<br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Am 15.01.2023 um 15:01 schrieb luigi
      scarso:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAG5iGsAyLFfHhy3c10+BdkWgGYhpxPEwsj1HDVoorCZAQ3kPHw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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"
              moz-do-not-send="true" class="moz-txt-link-freetext">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"
                moz-do-not-send="true">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" moz-do-not-send="true"
              class="moz-txt-link-freetext">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>
  </body>
</html>