From c766ac76f88d4542235043790e8048c12b37d4ff Mon Sep 17 00:00:00 2001 From: Marius Date: Wed, 12 Oct 2011 11:40:13 +0300 Subject: beta 2011.10.12 10:14 --- metapost/context/base/metafun.mpiv | 2 +- metapost/context/base/mp-tool.mp | 35 ++++++++++++++++++++++------------- 2 files changed, 23 insertions(+), 14 deletions(-) (limited to 'metapost') diff --git a/metapost/context/base/metafun.mpiv b/metapost/context/base/metafun.mpiv index 58e871075..80cfcd423 100644 --- a/metapost/context/base/metafun.mpiv +++ b/metapost/context/base/metafun.mpiv @@ -25,7 +25,7 @@ input mp-txts.mp ; input mp-butt.mp ; input mp-shap.mp ; % mp-char.mp ; % there no need to always load this -input mp-step.mp ; % there no need to always load this (todo) +% mp-step.mp ; % there no need to always load this input mp-grph.mp ; input mp-figs.mp ; input mp-mlib.mpiv ; diff --git a/metapost/context/base/mp-tool.mp b/metapost/context/base/mp-tool.mp index 35eca4727..1a758a963 100644 --- a/metapost/context/base/mp-tool.mp +++ b/metapost/context/base/mp-tool.mp @@ -2119,19 +2119,28 @@ enddef ; % handy -vardef bbwidth (expr p) = - (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 : if path p or picture p : - ypart (urcorner p - lrcorner p) - else : 0 fi else : 0 - fi) +vardef bbwidth (expr p) = % vardef width_of primary p = + 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) = % vardef heigth_of primary p = + 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