diff options
author | Marius <mariausol@gmail.com> | 2012-05-05 12:00:16 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-05-05 12:00:16 +0300 |
commit | b8bc4fc22157f43c15f40d784ab05bdd30c93c44 (patch) | |
tree | f096b894c12456009b4c8b63ade35013c6751960 /metapost | |
parent | e80abdc4f40ec9a4bc9f5faad4d86f8dbf19f96f (diff) | |
download | context-b8bc4fc22157f43c15f40d784ab05bdd30c93c44.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 ; |