diff options
author | Hans Hagen <pragma@wxs.nl> | 2011-10-12 10:14:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2011-10-12 10:14:00 +0200 |
commit | 4680e3b1c502484cdba78372162dd4f51e398894 (patch) | |
tree | c90941ed8418d2ddadf7bbf01342857f705b3122 /metapost | |
parent | bd9c410acd522b2308bd5c4a60f7f7670ecfa6c9 (diff) | |
download | context-4680e3b1c502484cdba78372162dd4f51e398894.tar.gz |
beta 2011.10.12 10:14
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/metafun.mpiv | 2 | ||||
-rw-r--r-- | metapost/context/base/mp-tool.mp | 35 |
2 files changed, 23 insertions, 14 deletions
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 |