diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-02 23:03:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-02 23:03:22 +0000 |
commit | 324efbd652f973cd70f42fe08c665c518995bcbe (patch) | |
tree | 818ae382dfa133f3dcceec8e12e4cbd42be8bcf4 /Build/source/utils/asymptote/base/plain_arrows.asy | |
parent | bbf699abe485e707133ff3ba502119f261f27269 (diff) |
asy 2.21 sources (no runtime update)
git-svn-id: svn://tug.org/texlive/trunk@29618 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/base/plain_arrows.asy')
-rw-r--r-- | Build/source/utils/asymptote/base/plain_arrows.asy | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Build/source/utils/asymptote/base/plain_arrows.asy b/Build/source/utils/asymptote/base/plain_arrows.asy index 59b65aa4126..3ae60938ed1 100644 --- a/Build/source/utils/asymptote/base/plain_arrows.asy +++ b/Build/source/utils/asymptote/base/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]); |