Skip to content

Commit

Permalink
Invert transform before assigning intersection #889
Browse files Browse the repository at this point in the history
This will always return the intersection in the untransformed scope, so
it is necessary to apply the same transformation as was active when
`\pgfintersectionofpaths' was called, although that should be the case
most of the time.
  • Loading branch information
hmenke committed Sep 4, 2020
1 parent 71becc1 commit 908db00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
\pgfmathloop%
\ifnum\pgfmathcounter>\pgfintersectionsolutions\relax%
\else%
\path[reset cm]\pgfextra{\pgftransformshift{\pgfpointintersectionsolution{\pgfmathcounter}}}%
\path\pgfextra{\pgftransformshift{\pgfpointintersectionsolution{\pgfmathcounter}}}%
coordinate (\tikz@intersect@@name-\pgfmathcounter);
\repeatpgfmathloop%
\ifx\tikz@intersect@by\pgfutil@empty%
Expand Down
2 changes: 2 additions & 0 deletions tex/generic/pgf/libraries/pgflibraryintersections.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,9 @@
\pgf@iflinesintersect{#1}{#2}{#3}{#4}%
{%
\pgfextract@process\pgf@intersect@solution@candidate{%
\pgftransforminvert
% pgf@x and pgf@y are already assigned by \pgf@iflinesintersect
\pgfpointtransformed{\pgfqpoint{\pgf@x}{\pgf@y}}%
}%
\pgf@ifsolution@duplicate{\pgf@intersect@solution@candidate}{%
% ah - we a duplicate. Apparently, we have a hit on an
Expand Down

0 comments on commit 908db00

Please sign in to comment.