summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/mlib-lmt.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-08-17 14:26:12 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-08-17 14:26:12 +0200
commit91b59bb4f8b33701c69e095841fe4cf57971ac20 (patch)
treefb02a1226f504fce16923a396ae41bf9b2b6cc04 /tex/context/base/mkiv/mlib-lmt.lua
parent59e7679528d75e5d523acddf69dabdce42d53734 (diff)
downloadcontext-91b59bb4f8b33701c69e095841fe4cf57971ac20.tar.gz
2019-08-17 11:54:00
Diffstat (limited to 'tex/context/base/mkiv/mlib-lmt.lua')
-rw-r--r--tex/context/base/mkiv/mlib-lmt.lua17
1 files changed, 16 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/mlib-lmt.lua b/tex/context/base/mkiv/mlib-lmt.lua
index 774ddc8e5..9137861a5 100644
--- a/tex/context/base/mkiv/mlib-lmt.lua
+++ b/tex/context/base/mkiv/mlib-lmt.lua
@@ -6,7 +6,12 @@ if not modules then modules = { } end modules ['mlib-lmt'] = {
license = "see context related readme files",
}
-local mppath = mp.path
+local mppath = mp.path
+
+local scannumeric = mp.scan.numeric
+local scanpath = mp.scan.path
+
+local getparameter = metapost.getparameter
function mp.lmt_function_x(xmin,xmax,xstep,code,shape) -- experimental
local code = "return function(x) return " .. code .. " end"
@@ -46,3 +51,13 @@ function mp.lmt_function_x(xmin,xmax,xstep,code,shape) -- experimental
end
mppath(points,shape == "curve" and ".." or "--",false)
end
+
+function mp.lmt_mesh_set()
+ local mesh = getparameter { "mesh", "paths" }
+ structures.references.currentset.mesh = mesh
+end
+
+function mp.lmt_mesh_update()
+ local mesh = getparameter { "paths" } or getparameter { "mesh", "paths" }
+ mesh[scannumeric()] = scanpath(true)
+end