diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-03-31 00:15:04 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-03-31 00:15:04 +0200 |
commit | 859ed31b143659de2ed45291cb5b121c41cecede (patch) | |
tree | 46e26547e894355e36f6bf40d989641d793a9561 /tex/context/base/lpdf-col.lua | |
parent | bda5ef0ab2fad99c51a767cfa51c569422dd4313 (diff) | |
download | context-859ed31b143659de2ed45291cb5b121c41cecede.tar.gz |
2015-03-30 23:36:00
Diffstat (limited to 'tex/context/base/lpdf-col.lua')
-rw-r--r-- | tex/context/base/lpdf-col.lua | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/tex/context/base/lpdf-col.lua b/tex/context/base/lpdf-col.lua index 030291c29..a2fda8ca5 100644 --- a/tex/context/base/lpdf-col.lua +++ b/tex/context/base/lpdf-col.lua @@ -48,6 +48,7 @@ local registercolor = colors.register local colorsvalue = colors.value local transparenciesvalue = transparencies.value local forcedmodel = colors.forcedmodel +local getpagecolormodel = colors.getpagecolormodel local c_transparency = pdfconstant("Transparency") @@ -98,11 +99,10 @@ table.setmetatableindex(transparencygroups, function(transparencygroups,colormod end end) -local currentgroupcolormodel - local function addpagegroup() - if currentgroupcolormodel then - local g = transparencygroups[currentgroupcolormodel] + local model = getpagecolormodel() + if model then + local g = transparencygroups[model] if g then addtopageattributes("Group",g) end @@ -111,13 +111,6 @@ end lpdf.registerpagefinalizer(addpagegroup,3,"pagegroup") -local function synchronizecolormodel(model) - currentgroupcolormodel = model -end - -backends.codeinjections.synchronizecolormodel = synchronizecolormodel -commands.synchronizecolormodel = synchronizecolormodel - -- injection code (needs a bit reordering) -- color injection @@ -491,8 +484,11 @@ function registrations.transparency(n,a,t) end statistics.register("page group warning", function() - if done and not transparencygroups[currentgroupcolormodel] then - return "transparencies are used but no pagecolormodel is set" + if done then + local model = getpagecolormodel() + if model and not transparencygroups[model] then + return "transparencies are used but no pagecolormodel is set" + end end end) |