diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-05-05 10:42:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-05-05 10:42:00 +0200 |
commit | 3e0a49fa480ce962beb49ca9f4741ee97bebc176 (patch) | |
tree | 75eb0bd1970bc4f7e5087ccadc48824f0617a451 /metapost | |
parent | 31cd3d0f156a0a5f8981e18ac8a2f2e3d93341c4 (diff) | |
download | context-3e0a49fa480ce962beb49ca9f4741ee97bebc176.tar.gz |
beta 2012.05.05 10:42
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/mp-mlib.mpiv | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/metapost/context/base/mp-mlib.mpiv b/metapost/context/base/mp-mlib.mpiv index 43e620cfa..f89e7a491 100644 --- a/metapost/context/base/mp-mlib.mpiv +++ b/metapost/context/base/mp-mlib.mpiv @@ -591,3 +591,27 @@ enddef ; % property p ; p = properties(withcolor (1,1,0,1)) ; % fill fullcircle scaled 20cm withproperties p ; + +% Experimental: + +primarydef t asgroup s = % s = isolated|knockout + begingroup + save savedpicture ; + picture savedpicture ; + save currentbounds ; + path currentbounds ; + savedpicture := if picture t : t else : image(draw t) fi ; + currentbounds := boundingbox savedpicture ; + image ( + draw currentbounds + withprescript "gr_state=start" + withprescript "gr_type=" & s + withprescript "gr_llx=" & decimal xpart llcorner currentbounds + withprescript "gr_lly=" & decimal ypart llcorner currentbounds + withprescript "gr_urx=" & decimal xpart urcorner currentbounds + withprescript "gr_ury=" & decimal ypart urcorner currentbounds ; + draw savedpicture ; + draw currentbounds + withprescript "gr_state=stop" ; + ) endgroup +enddef ; |