summaryrefslogtreecommitdiff
path: root/tex/context/base/colo-ext.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2012-01-05 19:27:44 +0100
committerHans Hagen <pragma@wxs.nl>2012-01-05 19:27:44 +0100
commit10ba6dc2c1d2541b4a353c17b88dcf3e9c16fd5b (patch)
tree3370a241565dc03c5a5e7c962aedf1de6b61a752 /tex/context/base/colo-ext.mkiv
parent140009d337d42f52dc7e305c5f500445741a4735 (diff)
downloadcontext-10ba6dc2c1d2541b4a353c17b88dcf3e9c16fd5b.tar.gz
beta 2011.12.16 17:07
Diffstat (limited to 'tex/context/base/colo-ext.mkiv')
-rw-r--r--tex/context/base/colo-ext.mkiv17
1 files changed, 17 insertions, 0 deletions
diff --git a/tex/context/base/colo-ext.mkiv b/tex/context/base/colo-ext.mkiv
index 688b3d441..6cb02f88b 100644
--- a/tex/context/base/colo-ext.mkiv
+++ b/tex/context/base/colo-ext.mkiv
@@ -41,6 +41,23 @@
%D or independent. For the moment we only support independent overprint
%D handling. Here we deal with a per-document setting.
+%D We can move the stack and attribute setting to the \LUA\ end.
+
+\def\registercolorintent#1#2%
+ {\setevalue{\??qi:#1}{\attribute\colorintentattribute\ctxcommand{registercolorintent('#2')} }}
+
+\def\dotriggercolorintent
+ {\ctxcommand{enablecolorintents()}%
+ \gdef\dotriggercolorintent##1{\csname\??qi:##1\endcsname}%
+ \dotriggercolorintent}
+
+\registercolorintent{knockout} {knockout}
+\registercolorintent{overprint}{overprint}
+
+\installattributestack\colorintentattribute
+
+\setevalue{\??qi:\v!none}{\attribute\colorintentattribute\attributeunsetvalue} % or reset? used at all?
+
\unexpanded\def\startcolorintent[#1]%
{\pushattribute\colorintentattribute
\dotriggercolorintent{#1}}