summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/base
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-04-27 22:38:18 +0000
committerKarl Berry <karl@freefriends.org>2014-04-27 22:38:18 +0000
commit55e45a0d588de0392d2198753e45d75cd58f9e4d (patch)
tree358fbf59150b403df32a1cdce8203a6a430df110 /Build/source/utils/asymptote/base
parent7aca5de4dcd646af709f86123599cdcb45d6445f (diff)
asy 2.26 sources
git-svn-id: svn://tug.org/texlive/trunk@33703 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/base')
-rw-r--r--Build/source/utils/asymptote/base/embed.asy2
-rw-r--r--Build/source/utils/asymptote/base/plain_arrows.asy14
-rw-r--r--Build/source/utils/asymptote/base/three_arrows.asy8
3 files changed, 8 insertions, 16 deletions
diff --git a/Build/source/utils/asymptote/base/embed.asy b/Build/source/utils/asymptote/base/embed.asy
index 30f2881da04..ad2b710c36b 100644
--- a/Build/source/utils/asymptote/base/embed.asy
+++ b/Build/source/utils/asymptote/base/embed.asy
@@ -10,7 +10,7 @@ if(latex() && !settings.inlineimage) {
}
// For documentation of the options see
-// http://www.ctan.org/tex-archive/macros/latex/contrib/media9/doc/media9.pdf
+// http://mirror.ctan.org/macros/latex/contrib/media9/doc/media9.pdf
// Embed PRC or SWF content in pdf file
string embedplayer(string name, string text="", string options="",
diff --git a/Build/source/utils/asymptote/base/plain_arrows.asy b/Build/source/utils/asymptote/base/plain_arrows.asy
index 3ae60938ed1..d4220103ce0 100644
--- a/Build/source/utils/asymptote/base/plain_arrows.asy
+++ b/Build/source/utils/asymptote/base/plain_arrows.asy
@@ -36,12 +36,12 @@ struct arrowhead
filltype defaultfilltype(pen) {return FillDraw;}
}
-real[] arrowbasepoints(path base, path left, path right)
+real[] arrowbasepoints(path base, path left, path right, real default=0)
{
real[][] Tl=transpose(intersections(left,base));
real[][] Tr=transpose(intersections(right,base));
- return new real[] {Tl.length > 0 ? Tl[0][0] : 0,
- Tr.length > 0 ? Tr[0][0] : 0};
+ return new real[] {Tl.length > 0 ? Tl[0][0] : default,
+ Tr.length > 0 ? Tr[0][0] : default};
}
path arrowbase(path r, pair y, real t, real size)
@@ -87,12 +87,12 @@ SimpleHead.head=new path(path g, position position=EndPoint, pen p=currentpen,
path base=arrowbase(r,y,t,size);
path left=rotate(-angle,x)*r;
path right=rotate(angle,x)*r;
- real[] T=arrowbasepoints(base,left,right);
+ real[] T=arrowbasepoints(base,left,right,1);
pair denom=point(right,T[1])-y;
real factor=denom != 0 ? length((point(left,T[0])-y)/denom) : 1;
path left=rotate(-angle*factor,x)*r;
path right=rotate(angle*factor,x)*r;
- real[] T=arrowbasepoints(base,left,right);
+ real[] T=arrowbasepoints(base,left,right,1);
return subpath(left,T[0],0)--subpath(right,0,T[1]);
};
@@ -114,12 +114,12 @@ arrowhead HookHead(real dir=arrowdir, real barb=arrowbarb)
path base=arrowbase(r,y,t,size);
path left=rotate(-angle,x)*r;
path right=rotate(angle,x)*r;
- real[] T=arrowbasepoints(base,left,right);
+ real[] T=arrowbasepoints(base,left,right,1);
pair denom=point(right,T[1])-y;
real factor=denom != 0 ? length((point(left,T[0])-y)/denom) : 1;
path left=rotate(-angle*factor,x)*r;
path right=rotate(angle*factor,x)*r;
- real[] T=arrowbasepoints(base,left,right);
+ real[] T=arrowbasepoints(base,left,right,1);
left=subpath(left,0,T[0]);
right=subpath(right,T[1],0);
pair pl0=point(left,0), pl1=relpoint(left,1);
diff --git a/Build/source/utils/asymptote/base/three_arrows.asy b/Build/source/utils/asymptote/base/three_arrows.asy
index 5b9bd45d56f..4398b9bd781 100644
--- a/Build/source/utils/asymptote/base/three_arrows.asy
+++ b/Build/source/utils/asymptote/base/three_arrows.asy
@@ -245,14 +245,6 @@ TeXHead3.head=new surface(path3 g, position position=EndPoint,
}
};
-real[] arrowbasepoints(path3 base, path3 left, path3 right)
-{
- real[][] Tl=transpose(intersections(left,base));
- real[][] Tr=transpose(intersections(right,base));
- return new real[] {Tl.length > 0 ? Tl[0][0] : 0,
- Tr.length > 0 ? Tr[0][0] : 0};
-}
-
path3 arrowbase(path3 r, triple y, real t, real size)
{
triple perp=2*size*perp(dir(r,t));