diff options
Diffstat (limited to 'metapost/context/base/mp-tool.mpiv')
-rw-r--r-- | metapost/context/base/mp-tool.mpiv | 17 |
1 files changed, 14 insertions, 3 deletions
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 ; |