Re: Clipped svg output
Lutz Haseloff <[email protected]> Fri, 20 Jan 2023 10:18:54 +0100
| Newsgroups | gmane.comp.tex.metapost |
|---|---|
| Message-ID | <[email protected]> |
Hi Luigi, I did read it but I'm not a programmer, sorry. So only now it makes sense to me, that only coordinates with fractions are affected. I will try to compile mpost as soon as the patch is committed. Thank you very much again. Greetings Lutz Am 20.01.2023 um 09:56 schrieb luigi scarso: > > > On Fri, 20 Jan 2023 at 09:49, Lutz Haseloff > <[email protected]> wrote: > > Hi Luigi, > > your hint, only to use the "positive quadrant" led me to this ugly > workaround until mpost's svg output is debugged: > > def korrektur = > z1 = llcorner currentpicture ; > numeric dw, dh ; > if x1 < 0: dw := abs x1; else: dw := 0 fi ; > if y1 < 0: dh := abs y1; else: dh := 0 fi ; > currentpicture := currentpicture shifted (dw,dh) ; > enddef ; > outputformat := "svg"; > outputtemplate := "%j-%c-corrected.%{outputformat}"; > for i = 17 upto 23 : > beginfig(i) > fill fullcircle scaled i withcolor red ; > korrektur ; > endfig ; > endfor ; > end > > (seems to work so far...) > > Ah ok, but I was talking about source/texk/web2c/mplibdir/svgout.w, > wher you can read the > @ We often need to print a pair of coordinates. > > Because of bugs in svg rendering software, > : > text. I think we can use double instead of integer for dx and dy (I > will commit the patch this evening). > > -- > luigi > -- http://tug.org/metapost/