diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-07-05 13:37:27 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-07-05 13:37:27 +0200 |
commit | a596680c20618232e248aa4e45bed22749a30e1b (patch) | |
tree | 4a23eacbf1cccac6d60fc01b762afc369845f196 /tex/context/base/mkiv/mlib-pps.lua | |
parent | da9149010f4d34eef23a504682d82cdcf4fac8f5 (diff) | |
download | context-a596680c20618232e248aa4e45bed22749a30e1b.tar.gz |
2016-07-05 13:06:00
Diffstat (limited to 'tex/context/base/mkiv/mlib-pps.lua')
-rw-r--r-- | tex/context/base/mkiv/mlib-pps.lua | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/mlib-pps.lua b/tex/context/base/mkiv/mlib-pps.lua index 42a2cf12a..74df758d1 100644 --- a/tex/context/base/mkiv/mlib-pps.lua +++ b/tex/context/base/mkiv/mlib-pps.lua @@ -61,6 +61,7 @@ local makempy = metapost.makempy local nooutercolor = "0 g 0 G" local nooutertransparency = "/Tr0 gs" -- only when set local outercolormode = 0 +local outercolormodel = 1 local outercolor = nooutercolor local outertransparency = nooutertransparency local innercolor = nooutercolor @@ -72,7 +73,8 @@ local pdftransparency = lpdf.transparency function metapost.setoutercolor(mode,colormodel,colorattribute,transparencyattribute) -- has always to be called before conversion -- todo: transparency (not in the mood now) - outercolormode = mode + outercolormode = mode + outercolormodel = colormodel if mode == 1 or mode == 3 then -- inherit from outer (registered color) outercolor = pdfcolor(colormodel,colorattribute) or nooutercolor @@ -446,6 +448,11 @@ function models.gray(cr) return checked_color_pair(f_gray,s,s) end +models[1] = models.all +models[2] = models.gray +models[3] = models.rgb +models[4] = models.cmyk + setmetatableindex(models, function(t,k) local v = models.gray t[k] = v @@ -453,7 +460,8 @@ setmetatableindex(models, function(t,k) end) local function colorconverter(cs) - return models[colors.model](cs) + -- return models[colors.model](cs) + return models[outercolormodel](cs) end local btex = P("btex") @@ -868,6 +876,9 @@ end function metapost.resetplugins(t) -- intialize plugins, before figure if top.plugmode then + + outercolormodel = colors.currentmodel() -- currently overloads the one set at the tex end + -- plugins can have been added resetter = resetteractions.runner analyzer = analyzeractions.runner |