summaryrefslogtreecommitdiff
path: root/metapost
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2016-11-04 12:01:00 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-11-04 12:01:00 +0100
commit2ad220abb483dea0ba0d85d9963095f5c7dfdfa1 (patch)
treef2bdb02c48bf671d1e57da3d759c602231ac9a22 /metapost
parent5a501d72ddc9ab9003746aa46fad3a12046e20ec (diff)
downloadcontext-2ad220abb483dea0ba0d85d9963095f5c7dfdfa1.tar.gz
2016-11-04 11:12:00
Diffstat (limited to 'metapost')
-rw-r--r--metapost/context/base/mpiv/mp-tool.mpiv27
1 files changed, 7 insertions, 20 deletions
diff --git a/metapost/context/base/mpiv/mp-tool.mpiv b/metapost/context/base/mpiv/mp-tool.mpiv
index a4528a2f8..65e4c3624 100644
--- a/metapost/context/base/mpiv/mp-tool.mpiv
+++ b/metapost/context/base/mpiv/mp-tool.mpiv
@@ -95,28 +95,15 @@ vardef image@#(text t) =
currentpicture := nullpicture ;
t ;
currentpicture
- shifted (mfun_labxf@#*lrcorner currentpicture +
- mfun_labyf@#*ulcorner currentpicture +
- (1-mfun_labxf@#-mfun_labyf@#)*llcorner currentpicture)
+ if str @# <> "" :
+ shifted (
+ mfun_labxf@# * lrcorner p
+ + mfun_labyf@# * ulcorner p
+ + (1-mfun_labxf@#-mfun_labyf@#) * llcorner p
+ )
+ fi
enddef ;
-% 10% faster
-%
-% vardef image@#(text t) =
-% save currentpicture ;
-% picture currentpicture ;
-% currentpicture := nullpicture ;
-% t ;
-% currentpicture
-% if str @# <> "" :
-% shifted (
-% mfun_labxf@# * lrcorner currentpicture
-% + mfun_labyf@# * ulcorner currentpicture
-% + (1-mfun_labxf@#-mfun_labyf@#) * llcorner currentpicture
-% )
-% fi
-% enddef ;
-
%D Colors:
newinternal nocolormodel ; nocolormodel := 1 ;