From 3470f9c8287a1a28fba72a83038cd54ab64c6da9 Mon Sep 17 00:00:00 2001 From: Marius Date: Sun, 6 May 2012 23:00:14 +0300 Subject: beta 2012.05.06 21:53 --- metapost/context/base/mp-tool.mpiv | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'metapost/context/base/mp-tool.mpiv') diff --git a/metapost/context/base/mp-tool.mpiv b/metapost/context/base/mp-tool.mpiv index d52820d13..39449b511 100644 --- a/metapost/context/base/mp-tool.mpiv +++ b/metapost/context/base/mp-tool.mpiv @@ -1144,15 +1144,26 @@ enddef ; %D The next two macros are adapted versions of plain %D \METAPOST\ definitions. +vardef arrowpath expr p = % patch by Peter Rolf: supports squared pen and shifting (hh: maybe just use center of head as first) + (p cutafter makepath(pencircle scaled 2(ahlength*cosd(.5ahangle)) shifted point length p of p)) +enddef; + +% def _finarr text t = +% if autoarrows : set_ahlength (t) fi ; +% draw arrowpath _apth t ; % arrowpath added +% filldraw arrowhead _apth t ; +% enddef; + def _finarr text t = if autoarrows : set_ahlength (t) fi ; - draw _apth t ; - filldraw arrowhead _apth t ; + draw arrowpath _apth t ; % arrowpath added + fill arrowhead _apth t ; + draw arrowhead _apth t ; enddef; def _findarr text t = if autoarrows : set_ahlength (t) fi ; - draw _apth t ; + draw arrowpath _apth t ; fill arrowhead _apth withpen currentpen t ; fill arrowhead reverse _apth withpen currentpen t ; enddef ; -- cgit v1.2.3