From 2ad220abb483dea0ba0d85d9963095f5c7dfdfa1 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 4 Nov 2016 12:01:00 +0100 Subject: 2016-11-04 11:12:00 --- metapost/context/base/mpiv/mp-tool.mpiv | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'metapost') 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 ; -- cgit v1.2.3