summaryrefslogtreecommitdiff
path: root/metapost/context/base/mp-tool.mpiv
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-05-06 23:00:14 +0300
committerMarius <mariausol@gmail.com>2012-05-06 23:00:14 +0300
commit3470f9c8287a1a28fba72a83038cd54ab64c6da9 (patch)
treeb1e4db45722707489512c3a46b4762cd0c1f880e /metapost/context/base/mp-tool.mpiv
parenta45b55349d166c2e4eb46ef431617c9ce7183dc0 (diff)
downloadcontext-3470f9c8287a1a28fba72a83038cd54ab64c6da9.tar.gz
beta 2012.05.06 21:53
Diffstat (limited to 'metapost/context/base/mp-tool.mpiv')
-rw-r--r--metapost/context/base/mp-tool.mpiv17
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 ;