diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-05-12 01:19:03 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-05-12 01:19:03 +0200 |
commit | 77e216e323271fb85d508b7206b13c980540b74b (patch) | |
tree | 5b4053c2bbe5190e28c0dce89653c7b13aea0642 /metapost/context/base/mpiv/mp-mlib.mpiv | |
parent | d817aef76ab8b606c02bd0636661b634b43a68a6 (diff) | |
download | context-77e216e323271fb85d508b7206b13c980540b74b.tar.gz |
2018-05-12 00:16:00
Diffstat (limited to 'metapost/context/base/mpiv/mp-mlib.mpiv')
-rw-r--r-- | metapost/context/base/mpiv/mp-mlib.mpiv | 17 |
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 |