diff options
author | Karl Berry <karl@freefriends.org> | 2010-10-29 00:31:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-10-29 00:31:31 +0000 |
commit | 6bc1f5497cfb2f56d65c80a4c36ea3bad6dc046c (patch) | |
tree | f7751da75030fb1e06653eeb44e579fcee09c65f /Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex | |
parent | ed0c7c756e441b2d2ba3633da233fc24361ac0d3 (diff) |
pgf 2.10 (28oct10)
git-svn-id: svn://tug.org/texlive/trunk@20236 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.tex | 42 |
1 files changed, 37 insertions, 5 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 3ab2b4e009b..79cb3a06f77 100644 --- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex @@ -7,7 +7,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepoints.code.tex,v 1.13 2008/02/03 19:37:26 tantau Exp $ +\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepoints.code.tex,v 1.20 2010/04/09 08:53:45 ludewich Exp $ \newdimen\pgf@picminx \newdimen\pgf@picmaxx @@ -35,7 +35,7 @@ \def\pgfextract@process#1#2{% \pgf@process{#2}% - \edef#1{\noexpand\pgf@x\the\pgf@x\noexpand\pgf@y\the\pgf@y}% + \edef#1{\noexpand\pgf@x=\the\pgf@x\noexpand\relax\noexpand\pgf@y=\the\pgf@y\noexpand\relax}% } % This needed until old shapes code changed. \let\pgfsavepgf@process\pgfextract@process% @@ -172,6 +172,14 @@ \def\pgfpointscale#1#2{% \pgf@process{#2}% + \pgfmathparse{#1}% + \pgf@x=\pgfmathresult\pgf@x% + \pgf@y=\pgfmathresult\pgf@y% +} +% A "quick" variant of \pgfpointscale which doesn't invoke the math parser for '#1'. +% #1 must be a number without units, no registers are accepted. +\def\pgfqpointscale#1#2{% + \pgf@process{#2}% \pgf@x=#1\pgf@x% \pgf@y=#1\pgf@y% } @@ -736,6 +744,15 @@ \advance\pgf@y by \pgftemp@y\pgf@yy} +% "Quick" variant for \pgfpointxy. +% +% Only numbers without unit are allowed here. +\def\pgfqpointxy#1#2{% + \pgf@x=#1\pgf@xx% + \advance\pgf@x by #2\pgf@yx% + \pgf@y=#1\pgf@xy% + \advance\pgf@y by #2\pgf@yy} + % Store the vector #1 * x-vec + #2 * y-vec + #3 * z-vec % % #1 = a factor for the x-vector @@ -782,6 +799,16 @@ \advance\pgf@y by \pgftemp@y\pgf@yy% \advance\pgf@y by \pgftemp@z\pgf@zy} +% "Quick" variant for \pgfpointxyz. +% +% Only numbers without unit are allowed. +\def\pgfqpointxyz#1#2#3{% + \pgf@x=#1\pgf@xx% + \advance\pgf@x by #2\pgf@yx% + \advance\pgf@x by #3\pgf@zx% + \pgf@y=#1\pgf@xy% + \advance\pgf@y by #2\pgf@yy% + \advance\pgf@y by #3\pgf@zy} @@ -913,7 +940,7 @@ \pgf@x=0pt\relax% \else% \divide\c@pgf@countb by \c@pgf@counta% - \pgf@y=\csname pgf@cosfrac\the\c@pgf@countb\endcsname pt% + \pgf@y=\csname pgfmath@cosfrac@\the\c@pgf@countb\endcsname pt% \pgf@xc=8192pt% \divide\pgf@xc by\c@pgf@counta% \pgf@x=\pgf@sys@tonumber{\pgf@xc}\pgf@xa% @@ -1114,6 +1141,13 @@ #1=\pgf@y\relax} +% Stores the most recently used (x,y) coordinates into two macros, #1 +% and #2. +\def\pgfgetlastxy#1#2{% + \edef#1{\the\pgf@x}% + \edef#2{\the\pgf@y}% +}% + \def\pgf@def#1#2#3{\expandafter\def\csname pgf@#1#2\endcsname{#3}} \pgf@def{cosfrac}{0}{1} @@ -1168,6 +1202,4 @@ \pgf@def{cosfrac}{97}{0.717792} \pgf@def{cosfrac}{98}{0.714213} \pgf@def{cosfrac}{99}{0.710651} \pgf@def{cosfrac}{100}{0.707107} - - \endinput |