diff options
Diffstat (limited to 'metapost')
| -rw-r--r-- | metapost/context/base/mp-mlib.mpiv | 23 | 
1 files changed, 20 insertions, 3 deletions
| diff --git a/metapost/context/base/mp-mlib.mpiv b/metapost/context/base/mp-mlib.mpiv index 5e7a15395..c0cb499fa 100644 --- a/metapost/context/base/mp-mlib.mpiv +++ b/metapost/context/base/mp-mlib.mpiv @@ -90,9 +90,26 @@ enddef ;  let transparency = pair ; -def withtransparency expr t = -    withprescript "tr_alternative="  & decimal transparency_alternative_to_number(xpart t) -    withprescript "tr_transparency=" & decimal ypart t +% def withtransparency expr t = +%     withprescript "tr_alternative="  & decimal transparency_alternative_to_number(xpart t) +%     withprescript "tr_transparency=" & decimal ypart t +% enddef ; +% +% withtransparency (1,.5) +% withtransparency ("normal",.5) + +def withtransparency (expr t) (text rest) = +    if pair t : +        withprescript "tr_alternative="  & decimal transparency_alternative_to_number(xpart t) +        withprescript "tr_transparency=" & decimal ypart t +    else : +        mfun_with_transparency (transparency_alternative_to_number(t)) +    fi rest +enddef ; + +def mfun_with_transparency (expr a) expr t = +    withprescript "tr_alternative="  & decimal a +    withprescript "tr_transparency=" & decimal t  enddef ;  def cmyk(expr c, m, y, k) = % provided for downward compability | 
