diff options
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/mpiv/mp-tool.mpiv | 27 |
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 ; |