diff options
author | Karl Berry <karl@freefriends.org> | 2009-06-22 00:15:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-06-22 00:15:48 +0000 |
commit | ac6cde038884e924c511025d370671f7adf669c6 (patch) | |
tree | 1d233dcb20de06b39f78fc0e1db0c00eeb23b0a1 /Master/texmf/asymptote/plain_paths.asy | |
parent | 8542b3da905deccc50b1bd6d21c7474a29286b3f (diff) |
asymptote 1.77 install
git-svn-id: svn://tug.org/texlive/trunk@13866 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/asymptote/plain_paths.asy')
-rw-r--r-- | Master/texmf/asymptote/plain_paths.asy | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Master/texmf/asymptote/plain_paths.asy b/Master/texmf/asymptote/plain_paths.asy index 486f3f0cc7b..d457fa5bc28 100644 --- a/Master/texmf/asymptote/plain_paths.asy +++ b/Master/texmf/asymptote/plain_paths.asy @@ -329,19 +329,21 @@ pair inside(path p, pen fillrule=currentpen) int n=length(p); for(int i=0; i < n; ++i) { pair z=point(p,i); - real[] T=intersections(p,z,z+I*dir(p,i)); + pair dir=dir(p,i); + if(dir == 0) continue; + real[] T=intersections(p,z,z+I*dir); // Check midpoints of line segments formed between the // corresponding intersection points and z. for(int j=0; j < T.length; ++j) { if(T[j] != i) { pair w=point(p,T[j]); pair m=0.5*(z+w); - if(inside(windingnumber(p,m),fillrule)) return m; + if(interior(windingnumber(p,m),fillrule)) return m; } } } - abort("cannot find an interior point"); - return 0; + // cannot find an interior point: path is degenerate + return point(p,0); } // Return all intersection times of path g with the vertical line through (x,0). |