diff options
author | Hans Hagen <pragma@wxs.nl> | 2011-05-18 22:26:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2011-05-18 22:26:00 +0200 |
commit | 819217701ac4baf8b6099c8f8475ae22597454d4 (patch) | |
tree | 126d2efce6812cb8d8bd2f564e2699b9b2a77b5f /metapost | |
parent | 1a4587e7d792561d779de21e88eb424539085090 (diff) | |
download | context-819217701ac4baf8b6099c8f8475ae22597454d4.tar.gz |
beta 2011.05.18 22:26
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/mp-mlib.mp | 13 | ||||
-rw-r--r-- | metapost/context/base/mp-tool.mp | 12 |
2 files changed, 7 insertions, 18 deletions
diff --git a/metapost/context/base/mp-mlib.mp b/metapost/context/base/mp-mlib.mp index 6c7115cb7..04c8be099 100644 --- a/metapost/context/base/mp-mlib.mp +++ b/metapost/context/base/mp-mlib.mp @@ -60,14 +60,15 @@ def multitonecolor(expr name, fractions, components, value) = enddef ; def transparent(expr alternative, transparency)(text c) = - c - withprescript "tr_alternative=" & decimal transparency_alternative_to_number(alternative) - withprescript "tr_transparency=" & decimal transparency + 1 % this permits withcolor x intoshade y + withprescript "tr_alternative=" & decimal transparency_alternative_to_number(alternative) + withprescript "tr_transparency=" & decimal transparency + withcolor c enddef ; def withtransparency(expr alternative, transparency) = - withprescript "tr_alternative=" & decimal transparency_alternative_to_number(alternative) - withprescript "tr_transparency=" & decimal transparency + withprescript "tr_alternative=" & decimal transparency_alternative_to_number(alternative) + withprescript "tr_transparency=" & decimal transparency enddef ; def cmyk(expr c, m, y, k) = @@ -416,7 +417,7 @@ def withshading (expr how)(text rest) = enddef ; primarydef a shadedinto b = - 1 + 1 % does not work with transparency withprescript "sh_color=into" withprescript "sh_color_a=" & colordecimals a withprescript "sh_color_b=" & colordecimals b diff --git a/metapost/context/base/mp-tool.mp b/metapost/context/base/mp-tool.mp index 7f047fefc..4ada54429 100644 --- a/metapost/context/base/mp-tool.mp +++ b/metapost/context/base/mp-tool.mp @@ -132,18 +132,6 @@ cmykcolormodel := 7 ; let grayscale = numeric ; -% def colorlike(expr c) text v = % colorlike(a) b, c, d ; -% forsuffixes i=v : % save i ; -% if cmykcolor c : -% cmykcolor i ; -% elseif rgbcolor c : -% rgbcolor i ; -% else : -% grayscale i ; -% fi ; -% endfor ; -% enddef ; - vardef colorlike(text c) text v = % colorlike(a) b, c, d ; save _p_ ; picture _p_ ; forsuffixes i=v : |