summaryrefslogtreecommitdiff
path: root/metapost
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-10-12 11:40:13 +0300
committerMarius <mariausol@gmail.com>2011-10-12 11:40:13 +0300
commitc766ac76f88d4542235043790e8048c12b37d4ff (patch)
tree61e4e4fe4150eeb24e7bdb2fa5a95df1dd4d138f /metapost
parentd67c88b277ff5d781397fb99ef9470f51b8eeced (diff)
downloadcontext-c766ac76f88d4542235043790e8048c12b37d4ff.tar.gz
beta 2011.10.12 10:14
Diffstat (limited to 'metapost')
-rw-r--r--metapost/context/base/metafun.mpiv2
-rw-r--r--metapost/context/base/mp-tool.mp35
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