Skip to content

Commit

Permalink
Race condition in circle radius #756
Browse files Browse the repository at this point in the history
  • Loading branch information
hmenke committed Oct 23, 2019
1 parent fe04a0f commit 1302de8
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,13 @@
% Radii and arc options
\tikzset{x radius/.initial=0pt}%
\tikzset{y radius/.initial=0pt}%
\tikzset{radius/.style={/tikz/x radius=#1,/tikz/y radius=#1}}%
\tikzset{%
radius/.code={%
\pgfmathparse{#1}%
\pgfkeyssetevalue{/tikz/x radius}{\pgfmathresult}%
\pgfkeyssetevalue{/tikz/y radius}{\pgfmathresult}%

This comment has been minimized.

Copy link
@hmenke

hmenke Nov 3, 2019

Author Member

Oops. I think this strips the unit.

}%
}%
\tikzset{start angle/.initial=}%
\tikzset{end angle/.initial=}%
\tikzset{delta angle/.initial=}%
Expand Down Expand Up @@ -3616,7 +3622,7 @@
\tikzset{every circle/.try,#1}%
\pgftransformshift{\tikz@node@at}%
\tikz@transform%
\tikz@do@circle{\pgfkeysvalueof{/tikz/x radius}}{\pgfkeysvalueof{/tikz/y radius}}
\tikz@do@ellipse{\pgfkeysvalueof{/tikz/x radius}}{\pgfkeysvalueof{/tikz/y radius}}
}%
\tikz@scan@next@command%
}%
Expand All @@ -3628,15 +3634,28 @@
\ifpgfutil@in@%
\tikz@@ellipseB(#1)%
\else%
\tikz@do@circle{#1}{#1}%
\tikz@do@circle{#1}%
\fi%
}%
\tikz@scan@next@command%
}%
\def\tikz@@ellipseB(#1 and #2){%
\tikz@do@circle{#1}{#2}
\tikz@do@ellipse{#1}{#2}%
}%
\def\tikz@do@circle#1#2{
\def\tikz@do@circle#1{%
\pgfmathparse{#1}%
\let\tikz@ellipse@x=\pgfmathresult
\ifpgfmathunitsdeclared
\pgfpathellipse{\pgfpointorigin}%
{\pgfqpoint{\tikz@ellipse@x pt}{0pt}}%
{\pgfpoint{0pt}{\tikz@ellipse@x pt}}%
\else
\pgfpathellipse{\pgfpointorigin}%
{\pgfpointxy{\tikz@ellipse@x}{0}}%
{\pgfpointxy{0}{\tikz@ellipse@x}}%
\fi
}
\def\tikz@do@ellipse#1#2{
\pgfmathparse{#1}%
\let\tikz@ellipse@x=\pgfmathresult%
\ifpgfmathunitsdeclared%
Expand Down

0 comments on commit 1302de8

Please sign in to comment.