summaryrefslogtreecommitdiff
path: root/metapost/context/base/mpiv/mp-mlib.mpiv
diff options
context:
space:
mode:
Diffstat (limited to 'metapost/context/base/mpiv/mp-mlib.mpiv')
-rw-r--r--metapost/context/base/mpiv/mp-mlib.mpiv17
1 files changed, 14 insertions, 3 deletions
diff --git a/metapost/context/base/mpiv/mp-mlib.mpiv b/metapost/context/base/mpiv/mp-mlib.mpiv
index 115fe63ae..28a9ebfc5 100644
--- a/metapost/context/base/mpiv/mp-mlib.mpiv
+++ b/metapost/context/base/mpiv/mp-mlib.mpiv
@@ -79,7 +79,7 @@ enddef ;
def spotcolor(expr name, v) =
(1)
withprescript "sp_type=spot"
- withprescript "sp_name=" & name
+ withprescript "sp_name=" & name
withprescript "sp_value=" & colordecimals v
enddef ;
@@ -92,7 +92,7 @@ enddef ;
def transparent(expr a, t)(text c) = % use withtransparency instead
(1) % this permits withcolor x intoshade y
- withprescript "tr_alternative=" & decimal transparency_alternative_to_number(a)
+ withprescript "tr_alternative=" & decimal transparency_alternative_to_number(a)
withprescript "tr_transparency=" & decimal t
withcolor c
enddef ;
@@ -1596,7 +1596,18 @@ def nofill text t = fill t withpostscript "collect" enddef ;
% so we can do: withcolor "red"
-vardef resolvedcolor primary s =
+% vardef resolvedcolor primary s =
+% % lua.mp.namedcolor(s) % conflicts with macro namedcolor
+% % lua.mp.NamedColor(s) % okay but, can also be
+% % lua.mp("NamedColor",s) % which gives expansion mess
+% if string s :
+% runscript("mp.NamedColor('" & s & "')") % faster anyway
+% else :
+% s
+% fi
+% enddef ;
+
+def resolvedcolor primary s = % no vardef
% lua.mp.namedcolor(s) % conflicts with macro namedcolor
% lua.mp.NamedColor(s) % okay but, can also be
% lua.mp("NamedColor",s) % which gives expansion mess