summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex111
1 files changed, 63 insertions, 48 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
index 38bbdf07bba..0d5b5482a57 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
@@ -1,9 +1,13 @@
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepathusage.code.tex,v 1.2 2005/07/17 22:34:19 tantau Exp $
-
-% Copyright 2005 by Till Tantau <tantau@cs.tu-berlin.de>.
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
%
-% This program can be redistributed and/or modified under the terms
-% of the GNU Public License, version 2.
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepathusage.code.tex,v 1.6 2006/10/11 15:22:25 tantau Exp $
% Stroke/fill/clip/etc. the current path. Depending on the options,
@@ -36,18 +40,18 @@
\define@key{pgfup}{use as bounding box}[]{\def\pgf@up@bb{\pgf@relevantforpicturesizefalse}}
\def\pgfusepath#1{%
- \let\pgf@up@stroke\@empty%
- \let\pgf@up@fill\@empty%
- \let\pgf@up@clip\@empty%
- \let\pgf@up@discard\@empty%
- \let\pgf@up@bb\@empty%
+ \let\pgf@up@stroke\pgf@empty%
+ \let\pgf@up@fill\pgf@empty%
+ \let\pgf@up@clip\pgf@empty%
+ \let\pgf@up@discard\pgf@empty%
+ \let\pgf@up@bb\pgf@empty%
\setkeys{pgfup}{#1}%
\expandafter\def\expandafter\pgf@up@action\expandafter{\csname pgfsys@\pgf@up@fill\pgf@up@stroke\endcsname}%
- \ifx\pgf@up@stroke\@empty%
- \ifx\pgf@up@fill\@empty%
- \ifx\pgf@up@clip\@empty%
- \let\pgf@up@action=\@empty%
- \pgfsyssoftpath@setcurrentpath\@empty%
+ \ifx\pgf@up@stroke\pgf@empty%
+ \ifx\pgf@up@fill\pgf@empty%
+ \ifx\pgf@up@clip\pgf@empty%
+ \let\pgf@up@action=\pgf@empty%
+ \pgfsyssoftpath@setcurrentpath\pgf@empty%
\else%
% only clipping
\let\pgf@up@action=\pgfsys@discardpath%
@@ -56,25 +60,28 @@
\fi%
\pgfprocessround{\pgfsyssoftpath@currentpath}{\pgfsyssoftpath@currentpath}% change the current path
%
- % Check whether the path is stroked. If so, add half the path width
+ % Check whether the path is stroked. If so, add half the line width
% to the bounding box.
%
\ifpgf@relevantforpicturesize%
- \ifx\pgf@up@stroke\@empty%
+ \ifx\pgf@up@stroke\pgf@empty%
\else%
- \pgf@x=\pgf@pathminx\advance\pgf@x by-.5\pgflinewidth%
- \ifdim\pgf@x<\pgf@picminx\global\pgf@picminx\pgf@x\fi%
- \pgf@y=\pgf@pathminy\advance\pgf@y by-.5\pgflinewidth%
- \ifdim\pgf@y<\pgf@picminy\global\pgf@picminy\pgf@y\fi%
- \pgf@x=\pgf@pathmaxx\advance\pgf@x by.5\pgflinewidth%
- \ifdim\pgf@x>\pgf@picmaxx\global\pgf@picmaxx\pgf@x\fi%
- \pgf@y=\pgf@pathmaxy\advance\pgf@y by.5\pgflinewidth%
- \ifdim\pgf@y>\pgf@picmaxy\global\pgf@picmaxy\pgf@y\fi%
+ \ifdim\pgf@picmaxx=-16000pt\relax%
+ \else%
+ \pgf@x=\pgf@pathminx\advance\pgf@x by-.5\pgflinewidth%
+ \ifdim\pgf@x<\pgf@picminx\global\pgf@picminx\pgf@x\fi%
+ \pgf@y=\pgf@pathminy\advance\pgf@y by-.5\pgflinewidth%
+ \ifdim\pgf@y<\pgf@picminy\global\pgf@picminy\pgf@y\fi%
+ \pgf@x=\pgf@pathmaxx\advance\pgf@x by.5\pgflinewidth%
+ \ifdim\pgf@x>\pgf@picmaxx\global\pgf@picmaxx\pgf@x\fi%
+ \pgf@y=\pgf@pathmaxy\advance\pgf@y by.5\pgflinewidth%
+ \ifdim\pgf@y>\pgf@picmaxy\global\pgf@picmaxy\pgf@y\fi%
+ \fi%
\fi%
\fi%
%
- \ifx\pgf@up@clip\@empty%
- \ifx\pgf@up@stroke\@empty%
+ \ifx\pgf@up@clip\pgf@empty%
+ \ifx\pgf@up@stroke\pgf@empty%
\pgfsyssoftpath@invokecurrentpath%
\pgfsyssoftpath@getcurrentpath\pgf@last@used@path%
\pgf@up@action%
@@ -85,7 +92,7 @@
\pgfsyssoftpath@invokecurrentpath%
\pgfsyssoftpath@getcurrentpath\pgf@last@used@path%
\pgf@up@action%
- \pgfsyssoftpath@setcurrentpath\@empty%
+ \pgfsyssoftpath@setcurrentpath\pgf@empty%
\pgf@add@arrows@as@needed%
\else%
\pgfsyssoftpath@invokecurrentpath%
@@ -101,7 +108,7 @@
\pgf@relevantforpicturesizefalse%
\fi%
\pgf@up@bb%
- \pgfsyssoftpath@setcurrentpath\@empty%
+ \pgfsyssoftpath@setcurrentpath\pgf@empty%
\pgf@resetpathsizes%
\ignorespaces%
}
@@ -128,13 +135,13 @@
\def\pgf@check@for@arrows{%
\pgf@drawarrowsfalse%
- \ifx\pgf@startarrow\@empty\else\pgf@drawarrowstrue\fi%
- \ifx\pgf@endarrow\@empty\else\pgf@drawarrowstrue\fi%
+ \ifx\pgf@startarrow\pgf@empty\else\pgf@drawarrowstrue\fi%
+ \ifx\pgf@endarrow\pgf@empty\else\pgf@drawarrowstrue\fi%
\ifdim\pgf@shorten@end@additional=0pt\relax\else\pgf@drawarrowstrue\fi%
\ifdim\pgf@shorten@start@additional=0pt\relax\else\pgf@drawarrowstrue\fi%
\ifpgf@drawarrows%
\pgfsyssoftpath@getcurrentpath\pgf@arrowpath%
- \ifx\pgf@arrowpath\@empty%
+ \ifx\pgf@arrowpath\pgf@empty%
\pgf@drawarrowsfalse%
\else%
\pgfprocesscheckclosed{\pgf@arrowpath}{\pgf@drawarrowsfalse}%
@@ -145,14 +152,14 @@
\newdimen\pgf@shorten@end@additional
\newdimen\pgf@shorten@start@additional
-\let\pgf@shorten@end=\@empty
-\let\pgf@shorten@start=\@empty
+\let\pgf@shorten@end=\pgf@empty
+\let\pgf@shorten@start=\pgf@empty
\def\pgf@shorten@path@as@needed{%
\pgfprocesspathextractpoints{\pgf@arrowpath}%
\let\pgf@arrow@next=\pgf@shorten@now%
- \ifx\pgf@shorten@start\@empty%
- \ifx\pgf@shorten@end\@empty%
+ \ifx\pgf@shorten@start\pgf@empty%
+ \ifx\pgf@shorten@end\pgf@empty%
\ifdim\pgf@shorten@end@additional=0pt\relax%
\ifdim\pgf@shorten@start@additional=0pt\relax%
\let\pgf@arrow@next=\relax%
@@ -169,33 +176,41 @@
\pgf@shorten@start%
\advance\pgf@x by\pgf@shorten@start@additional%
\pgf@xc=\pgf@x%
- \pgf@process{\pgfpointlineatdistance{\pgf@xc}{\pgfpointfirstonpath}{\pgfpointsecondonpath}}%
- \global\pgf@x=\pgf@x%
- \global\pgf@y=\pgf@y%
+ \pgfpointlineatdistance{\pgf@xc}{\pgfpointfirstonpath}{\pgfpointsecondonpath}%
+ \global\pgf@xb=\pgf@x%
+ \global\pgf@yb=\pgf@y%
+ \pgf@process{\pgfpointsecondonpath}%
+ \global\advance\pgf@x by\pgf@xa%
+ \global\advance\pgf@y by\pgf@ya%
}%
- \edef\pgfpointfirstonpath{\noexpand\pgfpoint{\the\pgf@x}{\the\pgf@y}}%
+ \edef\pgfpointfirstonpath{\noexpand\pgfpoint{\the\pgf@xb}{\the\pgf@yb}}%
+ \edef\pgfpointsecondonpath{\noexpand\pgfpoint{\the\pgf@x}{\the\pgf@y}}%
{%
\pgf@x=0pt%
\pgf@shorten@end%
\advance\pgf@x by\pgf@shorten@end@additional%
\pgf@xc=\pgf@x%
- \pgf@process{\pgfpointlineatdistance{\pgf@xc}{\pgfpointlastonpath}{\pgfpointsecondlastonpath}}%
- \global\pgf@x=\pgf@x%
- \global\pgf@y=\pgf@y%
+ \pgfpointlineatdistance{\pgf@xc}{\pgfpointlastonpath}{\pgfpointsecondlastonpath}%
+ \global\pgf@xb=\pgf@x%
+ \global\pgf@yb=\pgf@y%
+ \pgf@process{\pgfpointsecondlastonpath}%
+ \global\advance\pgf@x by\pgf@xa%
+ \global\advance\pgf@y by\pgf@ya%
}%
- \edef\pgfpointlastonpath{\noexpand\pgfpoint{\the\pgf@x}{\the\pgf@y}}%
+ \edef\pgfpointlastonpath{\noexpand\pgfpoint{\the\pgf@xb}{\the\pgf@yb}}%
+ \edef\pgfpointsecondlastonpath{\noexpand\pgfpoint{\the\pgf@x}{\the\pgf@y}}%
\pgfprocesspathreplacestartandend{\pgf@arrowpath}{\pgfpointfirstonpath}{\pgfpointlastonpath}%
\pgfsyssoftpath@setcurrentpath\pgf@arrowpath%
}
\def\pgf@add@arrows@as@needed{%
- \ifx\pgf@startarrow\@empty%
+ \ifx\pgf@startarrow\pgf@empty%
\else%
\pgflowlevelobj%
{\pgftransformarrow{\pgfpointsecondonpath}{\pgfpointfirstonpath}}
{\pgf@startarrow}%
\fi%
- \ifx\pgf@endarrow\@empty%
+ \ifx\pgf@endarrow\pgf@empty%
\else%
\pgflowlevelobj%
{\pgftransformarrow{\pgfpointsecondlastonpath}{\pgfpointlastonpath}}
@@ -203,7 +218,7 @@
\fi%
}
-\let\pgf@startarrow=\@empty
-\let\pgf@endarrow=\@empty
+\let\pgf@startarrow=\pgf@empty
+\let\pgf@endarrow=\pgf@empty
\endinput