summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/asymptote/plain_arrows.asy
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-08 18:41:28 +0000
committerKarl Berry <karl@freefriends.org>2013-04-08 18:41:28 +0000
commita3358f7394e3adabeff44a4858bab8f13cbe1180 (patch)
tree014354d566c06a47c483b7231af921247180f770 /Master/texmf-dist/asymptote/plain_arrows.asy
parent11bcd1a52098dab6ac5baa790409a2261a31755f (diff)
asymptote 2.21
git-svn-id: svn://tug.org/texlive/trunk@29753 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/asymptote/plain_arrows.asy')
-rw-r--r--Master/texmf-dist/asymptote/plain_arrows.asy10
1 files changed, 5 insertions, 5 deletions
diff --git a/Master/texmf-dist/asymptote/plain_arrows.asy b/Master/texmf-dist/asymptote/plain_arrows.asy
index 59b65aa4126..3ae60938ed1 100644
--- a/Master/texmf-dist/asymptote/plain_arrows.asy
+++ b/Master/texmf-dist/asymptote/plain_arrows.asy
@@ -40,8 +40,8 @@ real[] arrowbasepoints(path base, path left, path right)
{
real[][] Tl=transpose(intersections(left,base));
real[][] Tr=transpose(intersections(right,base));
- return new real[] {Tl.length > 0 ? Tl[0][0] : 1,
- Tr.length > 0 ? Tr[0][0] : 1};
+ return new real[] {Tl.length > 0 ? Tl[0][0] : 0,
+ Tr.length > 0 ? Tr[0][0] : 0};
}
path arrowbase(path r, pair y, real t, real size)
@@ -67,7 +67,7 @@ DefaultHead.head=new path(path g, position position=EndPoint, pen p=currentpen,
real[] T=arrowbasepoints(base,left,right);
pair denom=point(right,T[1])-y;
real factor=denom != 0 ? length((point(left,T[0])-y)/denom) : 1;
- path left=rotate(-angle,x)*r;
+ path left=rotate(-angle*factor,x)*r;
path right=rotate(angle*factor,x)*r;
real[] T=arrowbasepoints(base,left,right);
return subpath(left,0,T[0])--subpath(right,T[1],0)&cycle;
@@ -90,7 +90,7 @@ SimpleHead.head=new path(path g, position position=EndPoint, pen p=currentpen,
real[] T=arrowbasepoints(base,left,right);
pair denom=point(right,T[1])-y;
real factor=denom != 0 ? length((point(left,T[0])-y)/denom) : 1;
- path left=rotate(-angle,x)*r;
+ path left=rotate(-angle*factor,x)*r;
path right=rotate(angle*factor,x)*r;
real[] T=arrowbasepoints(base,left,right);
return subpath(left,T[0],0)--subpath(right,0,T[1]);
@@ -117,7 +117,7 @@ arrowhead HookHead(real dir=arrowdir, real barb=arrowbarb)
real[] T=arrowbasepoints(base,left,right);
pair denom=point(right,T[1])-y;
real factor=denom != 0 ? length((point(left,T[0])-y)/denom) : 1;
- path left=rotate(-angle,x)*r;
+ path left=rotate(-angle*factor,x)*r;
path right=rotate(angle*factor,x)*r;
real[] T=arrowbasepoints(base,left,right);
left=subpath(left,0,T[0]);