summaryrefslogtreecommitdiff
path: root/metapost
diff options
context:
space:
mode:
Diffstat (limited to 'metapost')
-rw-r--r--metapost/context/base/mp-tool.mp5
1 files changed, 3 insertions, 2 deletions
diff --git a/metapost/context/base/mp-tool.mp b/metapost/context/base/mp-tool.mp
index a98f73922..567ff16fd 100644
--- a/metapost/context/base/mp-tool.mp
+++ b/metapost/context/base/mp-tool.mp
@@ -2220,9 +2220,10 @@ enddef ;
% handy for myself
def addbackground text t =
- begingroup ; save p ; picture p ;
+ begingroup ; save p, b ; picture p ; path b ;
+ b := boundingbox currentpicture ;
p := currentpicture ; currentpicture := nullpicture ;
- fill boundingbox p t ; addto currentpicture also p ;
+ fill b t ; setbounds currentpicture to b ; addto currentpicture also p ;
endgroup ;
enddef ;