diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-05-16 00:21:21 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-05-16 00:21:21 +0200 |
commit | b344014638169aad6e5f6d2a9a703cb03a8b5064 (patch) | |
tree | a4457c5d1fdb99f6e8cfe67d53db97b297c1b3ef /metapost | |
parent | c7a8e05aac805e409247e3b36c000ab196831727 (diff) | |
download | context-b344014638169aad6e5f6d2a9a703cb03a8b5064.tar.gz |
2016-05-15 20:51:00
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/mpiv/mp-page.mpiv | 1 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-tool.mpiv | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/metapost/context/base/mpiv/mp-page.mpiv b/metapost/context/base/mpiv/mp-page.mpiv index 07d264f60..2e4a2b437 100644 --- a/metapost/context/base/mpiv/mp-page.mpiv +++ b/metapost/context/base/mpiv/mp-page.mpiv @@ -665,6 +665,7 @@ enddef ; % for the moment we put these here: +string RuleDirection ; RuleDirection := "" ; string RuleOption ; RuleOption := "" ; numeric RuleWidth ; RuleWidth := 0 ; numeric RuleHeight ; RuleHeight := 0 ; diff --git a/metapost/context/base/mpiv/mp-tool.mpiv b/metapost/context/base/mpiv/mp-tool.mpiv index 7696eb372..f7959e673 100644 --- a/metapost/context/base/mpiv/mp-tool.mpiv +++ b/metapost/context/base/mpiv/mp-tool.mpiv @@ -822,13 +822,21 @@ def colortype(expr c) = enddef ; vardef whitecolor(expr c) = - if cmykcolor c : (0,0,0,0) elseif rgbcolor c : (1,1,1) else : 1 fi + if cmykcolor c : (0,0,0,0) elseif rgbcolor c : (1,1,1) else : 1 fi enddef ; vardef blackcolor expr c = if cmykcolor c : (0,0,0,1) elseif rgbcolor c : (0,0,0) else : 0 fi enddef ; +vardef complementary expr c = ( + if cmykcolor c : (1,1,1,1) - + elseif rgbcolor c : (1,1,1) - + elseif pair c : (1,1) - + elseif numeric c : 1 - + fi c +) enddef ; + %D Well, this is the dangerous and naive version: def drawfill text t = |