From b17f22aa285224dcf5b1dbccd795bc73b9a16426 Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 19 May 2011 06:40:13 +0300 Subject: beta 2011.05.18 22:26 --- metapost/context/base/mp-mlib.mp | 13 +++++++------ metapost/context/base/mp-tool.mp | 12 ------------ 2 files changed, 7 insertions(+), 18 deletions(-) (limited to 'metapost') 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 : -- cgit v1.2.3