From eec06cd3ed759e8101b6cafa16d46884e479a4f6 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 15 May 2002 00:00:00 +0200 Subject: stable 2002.05.15 --- metapost/context/mp-tool.mp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'metapost') diff --git a/metapost/context/mp-tool.mp b/metapost/context/mp-tool.mp index e24bd45e9..1c8dc83f2 100644 --- a/metapost/context/mp-tool.mp +++ b/metapost/context/mp-tool.mp @@ -1732,11 +1732,18 @@ enddef ; % handy vardef bbwidth (expr p) = - (if known p : xpart (lrcorner p - llcorner p) else : 0 fi) + (if known p : + if path p or picture p : + xpart (lrcorner p - llcorner p) + else : 0 fi else : 0 + fi ) enddef ; vardef bbheight (expr p) = - (if known p : ypart (urcorner p - lrcorner p) else : 0 fi) + (if known p : if path p or picture p : + ypart (urcorner p - lrcorner p) + else : 0 fi else : 0 + fi) enddef ; color nocolor ; numeric noline ; % both unknown signals -- cgit v1.2.3