summaryrefslogtreecommitdiff
path: root/metapost/context/base/mpxl/mp-tool.mpxl
diff options
context:
space:
mode:
Diffstat (limited to 'metapost/context/base/mpxl/mp-tool.mpxl')
-rw-r--r--metapost/context/base/mpxl/mp-tool.mpxl12
1 files changed, 7 insertions, 5 deletions
diff --git a/metapost/context/base/mpxl/mp-tool.mpxl b/metapost/context/base/mpxl/mp-tool.mpxl
index 7b7814eef..adc2d1510 100644
--- a/metapost/context/base/mpxl/mp-tool.mpxl
+++ b/metapost/context/base/mpxl/mp-tool.mpxl
@@ -3390,22 +3390,24 @@ permanent break ;
% primarydef p xstretched w = (
% p if (bbwidth (p)>0) and (w>0) : xscaled (w/bbwidth (p)) fi
% ) enddef ;
+%
+% primarydef p ystretched h = (
+% p if (bbheight(p)>0) and (h>0) : yscaled (h/bbheight(p)) fi
+% ) enddef ;
+
primarydef p xstretched w = (
begingroup save l, r ; pair r;
r := xrange p ;
l := ypart r - xpart r ;
- p if (l > 0) and (w > 0) : xscaled (w/l (p)) fi
+ p if (l > 0) and (w > 0) : xscaled (w/l) fi
endgroup
) enddef ;
-% primarydef p ystretched h = (
-% p if (bbheight(p)>0) and (h>0) : yscaled (h/bbheight(p)) fi
-% ) enddef ;
primarydef p ystretched h = (
begingroup save l, r ; pair r;
r := yrange p ;
l := ypart r - xpart r ;
- p if (l > 0) and (h > 0) : yscaled (h/l (p)) fi
+ p if (l > 0) and (h > 0) : yscaled (h/l) fi
endgroup
) enddef ;