summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/metapost
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-05-17 21:26:14 +0000
committerKarl Berry <karl@freefriends.org>2016-05-17 21:26:14 +0000
commit089e7e2b5f7b92b6dfc6c6bf0c73b582c503eaaf (patch)
tree6151809a662d36591ae995e12cd6a8d7240dca71 /Master/texmf-dist/metapost
parent0c7ddd509036cc608279b743a5ca46a5003b0251 (diff)
context, from current (17may16)
git-svn-id: svn://tug.org/texlive/trunk@41222 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost')
-rw-r--r--Master/texmf-dist/metapost/context/base/mpiv/mp-tool.mpiv12
1 files changed, 12 insertions, 0 deletions
diff --git a/Master/texmf-dist/metapost/context/base/mpiv/mp-tool.mpiv b/Master/texmf-dist/metapost/context/base/mpiv/mp-tool.mpiv
index f7959e67312..76459d25c5a 100644
--- a/Master/texmf-dist/metapost/context/base/mpiv/mp-tool.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mpiv/mp-tool.mpiv
@@ -837,6 +837,18 @@ vardef complementary expr c = (
fi c
) enddef ;
+vardef complemented expr c =
+ save m ;
+ if cmykcolor c : m := max(cyanpart c, magentapart c, yellowpart c, blackpart c) ;
+ ( (m,m,m,m) -
+ elseif rgbcolor c : m := max(redpart c, greenpart c, bluepart c) ;
+ ( (m,m,m) -
+ elseif pair c : m := max(xpart c, ypart c) ;
+ ( (m,m) -
+ elseif numeric c : ( m -
+ fi c )
+enddef ;
+
%D Well, this is the dangerous and naive version:
def drawfill text t =