diff options
author | Hans Hagen <pragma@wxs.nl> | 2014-08-21 09:56:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2014-08-21 09:56:00 +0200 |
commit | 236b439da00fe0baaf9d7ad6ce684ecd6109555c (patch) | |
tree | e956172d575edd18d634605bfcf607ab96911ec1 /metapost | |
parent | 7169f20fa4a82724c4050f1c2756b303db5e2749 (diff) | |
download | context-236b439da00fe0baaf9d7ad6ce684ecd6109555c.tar.gz |
beta 2014.08.21 09:56
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/mp-mlib.mpiv | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/metapost/context/base/mp-mlib.mpiv b/metapost/context/base/mp-mlib.mpiv index 56815028e..cc19b6805 100644 --- a/metapost/context/base/mp-mlib.mpiv +++ b/metapost/context/base/mp-mlib.mpiv @@ -76,16 +76,30 @@ def multitonecolor(expr name, fractions, components, value) = withprescript "sp_value=" & value enddef ; -def transparent(expr alternative, transparency)(text c) = +% def transparent(expr alternative, transparency)(text c) = +% 1 % this permits withcolor x intoshade y +% withprescript "tr_alternative=" & decimal transparency_alternative_to_number(alternative) +% withprescript "tr_transparency=" & decimal transparency +% withcolor c +% enddef ; + +let transparency = pair ; + +def transparent(expr t)(text c) = 1 % this permits withcolor x intoshade y - withprescript "tr_alternative=" & decimal transparency_alternative_to_number(alternative) - withprescript "tr_transparency=" & decimal transparency + withprescript "tr_alternative=" & decimal transparency_alternative_to_number(xpart t) + withprescript "tr_transparency=" & decimal ypart t withcolor c enddef ; -def withtransparency(expr alternative, transparency) = - withprescript "tr_alternative=" & decimal transparency_alternative_to_number(alternative) - withprescript "tr_transparency=" & decimal transparency +% def withtransparency(expr alternative, transparency) = +% withprescript "tr_alternative=" & decimal transparency_alternative_to_number(alternative) +% withprescript "tr_transparency=" & decimal transparency +% enddef ; + +def withtransparency expr t = + withprescript "tr_alternative=" & decimal transparency_alternative_to_number(xpart t) + withprescript "tr_transparency=" & decimal ypart t enddef ; def cmyk(expr c, m, y, k) = % provided for downward compability |