summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/mlib-lua.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-10-11 16:46:49 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-10-11 16:46:49 +0200
commit24f6f7de245bdff10f21984a9a3c6af3d31fa1f1 (patch)
treeaf5b01583380cbe1e7890c29b42386ff58f25aa1 /tex/context/base/mkiv/mlib-lua.lua
parent64f50a1d7fe79d365b350c1bae688b9bf1b44d34 (diff)
downloadcontext-24f6f7de245bdff10f21984a9a3c6af3d31fa1f1.tar.gz
2019-10-11 15:56:00
Diffstat (limited to 'tex/context/base/mkiv/mlib-lua.lua')
-rw-r--r--tex/context/base/mkiv/mlib-lua.lua24
1 files changed, 23 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/mlib-lua.lua b/tex/context/base/mkiv/mlib-lua.lua
index 5af1ccb68..666025154 100644
--- a/tex/context/base/mkiv/mlib-lua.lua
+++ b/tex/context/base/mkiv/mlib-lua.lua
@@ -502,7 +502,6 @@ do
local function mptransform(x,y,xx,xy,yx,yy)
n = n + 1
- inspect(x)
if type(x) == "table" then
buffer[n] = f_transform(x[1],x[2],x[3],x[4],x[5],x[6])
else
@@ -510,6 +509,28 @@ do
end
end
+ local function mpcolor(c,m,y,k)
+ n = n + 1
+ if type(c) == "table" then
+ local l = #c
+ if l == 4 then
+ buffer[n] = f_quadruple(c[1],c[2],c[3],c[4])
+ elseif l == 3 then
+ buffer[n] = f_triplet(c[1],c[2],c[3])
+ else
+ buffer[n] = f_numeric(c[1])
+ end
+ else
+ if k then
+ buffer[n] = f_quadruple(c,m,y,k)
+ elseif y then
+ buffer[n] = f_triplet(c,m,y)
+ else
+ buffer[n] = f_numeric(c)
+ end
+ end
+ end
+
-- we have three kind of connectors:
--
-- .. ... -- (true)
@@ -658,6 +679,7 @@ do
aux.fprint = mpfprint
aux.quoted = mpquoted
aux.transform = mptransform
+ aux.color = mpcolor
-- for the moment