diff options
author | Hans Hagen <pragma@wxs.nl> | 2011-09-05 19:28:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2011-09-05 19:28:00 +0200 |
commit | 7e78c92b74e8b01d721befd8b1668a88c4bf8319 (patch) | |
tree | eb88a1998dabee80235935405ac3fa1bbb859abe /tex/context/base/colo-ini.lua | |
parent | 65c90323df2358c3ebbdbc4ae50cb49b8fd215cf (diff) | |
download | context-7e78c92b74e8b01d721befd8b1668a88c4bf8319.tar.gz |
beta 2011.09.05 19:28
Diffstat (limited to 'tex/context/base/colo-ini.lua')
-rw-r--r-- | tex/context/base/colo-ini.lua | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/tex/context/base/colo-ini.lua b/tex/context/base/colo-ini.lua index 1389eb71f..4ad564213 100644 --- a/tex/context/base/colo-ini.lua +++ b/tex/context/base/colo-ini.lua @@ -433,7 +433,7 @@ function colors.definemultitonecolor(name,multispec,colorspec,selfspec) end end -function colors.mpcolor(model,ca,ta,default) -- will move to mlib-col +local function mpcolor(model,ca,ta,default) -- will move to mlib-col local cv = colors.supported and colors.value(ca) -- faster when direct colors.values[ca] if cv then local tv = transparencies.supported and transparencies.value(ta) @@ -468,7 +468,7 @@ function colors.mpcolor(model,ca,ta,default) -- will move to mlib-col end end ---~ function colors.mpcolor(model,ca,ta,default) -- will move to mlib-col +--~ local function mpcolor(model,ca,ta,default) -- will move to mlib-col --~ local cv = colors.supported and colors.value(ca) -- faster when direct colors.values[ca] --~ if cv then --~ local tv = transparencies.supported and transparencies.value(ta) @@ -503,6 +503,13 @@ end --~ end --~ end +local function mpoptions(model,ca,ta,default) -- will move to mlib-col + return format("withcolor %s",mpcolor(model,ca,ta,default)) +end + +colors.mpcolor = mpcolor +colors.mpoptions = mpoptions + function colors.formatcolor(ca,separator) local cv = colors.value(ca) if cv then @@ -752,7 +759,7 @@ function colors.usecolors(name) } end --- interface +-- interface (todo: use locals) local setcolormodel = colors.setmodel @@ -783,7 +790,11 @@ function commands.formatcolor (...) context(colors.formatcolor function commands.formatgray (...) context(colors.formatgray (...)) end function commands.mpcolor(model,ca,ta,default) - context(colors.mpcolor(model,ca,ta,default)) + context(mpcolor(model,ca,ta,default)) +end + +function commands.mpoptions(model,ca,ta,default) + context(mpoptions(model,ca,ta,default)) end function commands.doifblackelse(a) |