diff options
author | Hans Hagen <pragma@wxs.nl> | 2021-03-17 18:50:41 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2021-03-17 18:50:41 +0100 |
commit | 94a53123a12ab97fcf453b5893941128e8ed4d44 (patch) | |
tree | fc3eb29cc06640a8dd183aca2b72843b23506de9 /metapost | |
parent | 7ab18e79ca56e0a86098536f4800fce0a75136d9 (diff) | |
download | context-94a53123a12ab97fcf453b5893941128e8ed4d44.tar.gz |
2021-03-17 17:45:00
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/mpxl/mp-lmtx.mpxl | 3 | ||||
-rw-r--r-- | metapost/context/base/mpxl/mp-mlib.mpxl | 7 | ||||
-rw-r--r-- | metapost/context/base/mpxl/mp-tool.mpxl | 18 |
3 files changed, 26 insertions, 2 deletions
diff --git a/metapost/context/base/mpxl/mp-lmtx.mpxl b/metapost/context/base/mpxl/mp-lmtx.mpxl index ec21b150a..c55d7177f 100644 --- a/metapost/context/base/mpxl/mp-lmtx.mpxl +++ b/metapost/context/base/mpxl/mp-lmtx.mpxl @@ -2108,7 +2108,7 @@ vardef lmt_do_svg = w := getparameter "width" ; h := getparameter "height" ; o := getparameter "offset" ; - lua.mp.lmt_svg_include() ; + lua.mp.lmt_svg_include() ; % textext runs twice .. maybe force once here if getparameter "origin" : currentpicture := currentpicture shifted -llcorner currentpicture ; fi ; @@ -2401,3 +2401,4 @@ vardef lmt_do_labtorgb = popparameters ; ) enddef ; + diff --git a/metapost/context/base/mpxl/mp-mlib.mpxl b/metapost/context/base/mpxl/mp-mlib.mpxl index ce0d14b41..e327069ea 100644 --- a/metapost/context/base/mpxl/mp-mlib.mpxl +++ b/metapost/context/base/mpxl/mp-mlib.mpxl @@ -1828,3 +1828,10 @@ vardef uniquelist(suffix list) = enddef ; permanent uniquelist ; + +% This influences the decision for a curve or path segment; 1/4096 is the default but +% 10/2048 works quite well. + +def withtolerance expr n = + withprescript ("tolerance=" & decimal n) +enddef ; diff --git a/metapost/context/base/mpxl/mp-tool.mpxl b/metapost/context/base/mpxl/mp-tool.mpxl index 7ea222fb0..88d34769c 100644 --- a/metapost/context/base/mpxl/mp-tool.mpxl +++ b/metapost/context/base/mpxl/mp-tool.mpxl @@ -3792,7 +3792,23 @@ vardef bymatrix(expr rx, sx, sy, ry, tx, ty) = t enddef ; -permanent totransform, bymatrix ; +% vardef bytopdownmatrix(expr rx, sx, sy, ry, tx, ty) = +% save t ; transform t ; +% xxpart t = rx ; yypart t = ry ; +% xypart t = -sy ; yxpart t = -sx ; +% xpart t = tx ; ypart t = ty ; +% t +% enddef ; + +def closedcurve expr p = + p if not cycle p : .. cycle fi +enddef ; + +def closedlines expr p = + p if not cycle p : -- cycle fi +enddef ; + +permanent totransform, bymatrix, closedcurve, closedlines ; let xslanted = slanted ; |