From b8bc4fc22157f43c15f40d784ab05bdd30c93c44 Mon Sep 17 00:00:00 2001 From: Marius Date: Sat, 5 May 2012 12:00:16 +0300 Subject: beta 2012.05.05 10:42 --- metapost/context/base/mp-mlib.mpiv | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'metapost') 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 ; -- cgit v1.2.3