summaryrefslogtreecommitdiff
path: root/metapost/context/base/mp-mlib.mp
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-05-19 06:40:13 +0300
committerMarius <mariausol@gmail.com>2011-05-19 06:40:13 +0300
commitb17f22aa285224dcf5b1dbccd795bc73b9a16426 (patch)
tree22984b597d5aacec58ceaf1cd7138c8bb1a5c892 /metapost/context/base/mp-mlib.mp
parentb714ce8e20b324368a7ab233be6fa9a0e50befa4 (diff)
downloadcontext-b17f22aa285224dcf5b1dbccd795bc73b9a16426.tar.gz
beta 2011.05.18 22:26
Diffstat (limited to 'metapost/context/base/mp-mlib.mp')
-rw-r--r--metapost/context/base/mp-mlib.mp13
1 files changed, 7 insertions, 6 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