summaryrefslogtreecommitdiff
path: root/metapost
diff options
context:
space:
mode:
Diffstat (limited to 'metapost')
-rw-r--r--metapost/context/base/mpxl/mp-lmtx.mpxl3
-rw-r--r--metapost/context/base/mpxl/mp-mlib.mpxl7
-rw-r--r--metapost/context/base/mpxl/mp-tool.mpxl18
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 ;