summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryintersections.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryintersections.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryintersections.code.tex9
1 files changed, 8 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryintersections.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryintersections.code.tex
index 6bed3e4721b..81b7d29c37d 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryintersections.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryintersections.code.tex
@@ -361,23 +361,30 @@
\global\advance\pgf@intersect@solutions by1\relax%
\expandafter\global\expandafter\let\csname pgfpoint@g@intersect@solution@\the\pgf@intersect@solutions\endcsname=\pgf@intersect@solution@candidate
\ifpgf@intersect@sort%
+ % save coordinates of the intersection
+ \pgf@process{\pgf@intersect@solution@candidate}%
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
+ % determine length of path
\pgf@process{\pgfpointdiff{\pgfpoint@intersect@start@a}{\pgfpoint@intersect@end@a}}%
\edef\pgf@marshal{%
- \noexpand\pgfmathveclen@{\pgfmath@tonumber{\pgf@xa}}{\pgfmath@tonumber{\pgf@ya}}%
+ \noexpand\pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
}%
\pgf@marshal%
\let\pgf@intersect@length@a=\pgfmathresult%
+ % determine distance of intersection from start
\pgf@process{\pgfpointdiff{\pgfpoint@intersect@start@a}{\pgfqpoint{\pgf@xc}{\pgf@yc}}}%
\edef\pgf@marshal{%
\noexpand\pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
}%
\pgf@marshal%
+ % scale the distance to the path length (path time)
\pgfmathdivide@{\pgfmathresult}{\pgf@intersect@length@a}%
\pgf@x=\pgfmathresult pt\relax%
+ % advance by the path segment (see definition of \pgf@intersection@store@properties)
\advance\pgf@x by\pgf@intersect@time@offset pt\relax%
\edef\pgf@intersect@time@a{\pgfmath@tonumber{\pgf@x}}%
+ % save numbered
\expandafter\global\expandafter\let\csname pgf@g@intersect@solution@\the\pgf@intersect@solutions @time@a\endcsname=
\pgf@intersect@time@a
\else