summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-04-08 17:23:59 +0000
committerKarl Berry <karl@freefriends.org>2019-04-08 17:23:59 +0000
commit9da8ac113f97e68e91e3a1ef26467f9814eb4312 (patch)
treef36b76c9a982931638dde95501c51072185dec56 /Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
parente919fa4b004d0ef401808c337d7def5fa259da0f (diff)
pgf revert to previous release (r49607, committed 5jan19)
git-svn-id: svn://tug.org/texlive/trunk@50867 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex87
1 files changed, 76 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
index 028546dde89..57db0d20ba2 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
@@ -568,8 +568,8 @@
%
% #1 = a time
% #2 = center of a ellipse
-% #3 = 0-degree axis of the ellipse
-% #4 = 90-degree axis of the ellipse
+% #3 = 0-degree exis of the ellipse
+% #4 = 90-degree exis of the ellipse
% #5 = start angle of an arc on the ellipse
% #6 = end angle of an arc on the ellipse
%
@@ -851,11 +851,11 @@
\def\pgfpointxyz#1#2#3{%
\pgfmathparse{#1}%
- \global\let\pgftemp@x=\pgfmathresult%
+ \let\pgftemp@x=\pgfmathresult%
\pgfmathparse{#2}%
- \global\let\pgftemp@y=\pgfmathresult%
+ \let\pgftemp@y=\pgfmathresult%
\pgfmathparse{#3}%
- \global\let\pgftemp@z=\pgfmathresult%
+ \let\pgftemp@z=\pgfmathresult%
\global\pgf@x=\pgftemp@x\pgf@xx%
\global\advance\pgf@x by \pgftemp@y\pgf@yx%
\global\advance\pgf@x by \pgftemp@z\pgf@zx%
@@ -943,12 +943,77 @@
\def\pgfpointnormalised#1{%
\pgf@process{#1}%
- \pgfmathatantwo{\the\pgf@y}{\the\pgf@x}%
- \let\pgf@tmp=\pgfmathresult%
- \pgfmathcos@{\pgf@tmp}%
- \pgf@x=\pgfmathresult pt\relax%
- \pgfmathsin@{\pgf@tmp}%
- \pgf@y=\pgfmathresult pt\relax%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \ifdim\pgf@x<0pt\relax% move into first quadrant
+ \global\pgf@x=-\pgf@x%
+ \fi%
+ \ifdim\pgf@y<0pt\relax%
+ \pgf@y=-\pgf@y%
+ \fi%
+ \ifdim\pgf@x>\pgf@y% x > y
+ % make point small
+ \c@pgf@counta=\pgf@x%
+ \divide\c@pgf@counta by 65536\relax%
+ \ifnum\c@pgf@counta=0\relax%
+ \c@pgf@counta=1\relax%
+ \fi%
+ \global\divide\pgf@x by\c@pgf@counta%
+ \global\divide\pgf@y by\c@pgf@counta%
+ \divide\pgf@xa by\c@pgf@counta%
+ \divide\pgf@ya by\c@pgf@counta%
+ % ok.
+ \global\pgf@x=.125\pgf@x%
+ \global\pgf@y=.125\pgf@y%
+ \c@pgf@counta=\pgf@x%
+ \c@pgf@countb=\pgf@y%
+ \multiply\c@pgf@countb by 100%
+ \ifnum\c@pgf@counta<64\relax%
+ \global\pgf@x=1pt\relax%
+ \global\pgf@y=0pt\relax%
+ \else%
+ \divide\c@pgf@countb by \c@pgf@counta%
+ \global\pgf@x=\csname pgf@cosfrac\the\c@pgf@countb\endcsname pt%
+ \pgf@xc=8192pt%
+ \divide\pgf@xc by\c@pgf@counta%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@ya%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@x}\pgf@y%
+ \fi%
+ \ifdim\pgf@xa<0pt%
+ \global\pgf@x=-\pgf@x%
+ \fi%
+ \else% x <= y
+ % make point small
+ \c@pgf@counta=\pgf@y%
+ \divide\c@pgf@counta by 65536\relax%
+ \ifnum\c@pgf@counta=0\relax%
+ \c@pgf@counta=1\relax%
+ \fi%
+ \global\divide\pgf@x by\c@pgf@counta%
+ \global\divide\pgf@y by\c@pgf@counta%
+ \divide\pgf@xa by\c@pgf@counta%
+ \divide\pgf@ya by\c@pgf@counta%
+ % ok.
+ \global\pgf@x=.125\pgf@x%
+ \global\pgf@y=.125\pgf@y%
+ \c@pgf@counta=\pgf@y%
+ \c@pgf@countb=\pgf@x%
+ \multiply\c@pgf@countb by 100%
+ \ifnum\c@pgf@counta<64\relax%
+ \global\pgf@y=1pt\relax%
+ \global\pgf@x=0pt\relax%
+ \else%
+ \divide\c@pgf@countb by \c@pgf@counta%
+ \global\pgf@y=\csname pgfmath@cosfrac@\the\c@pgf@countb\endcsname pt%
+ \pgf@xc=8192pt%
+ \divide\pgf@xc by\c@pgf@counta%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@xc}\pgf@xa%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@y}\pgf@x%
+ \fi%
+ \ifdim\pgf@ya<0pt%
+ \global\pgf@y=-\pgf@y%
+ \fi%
+ \fi\ignorespaces%
}