summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-10-29 00:31:31 +0000
committerKarl Berry <karl@freefriends.org>2010-10-29 00:31:31 +0000
commit6bc1f5497cfb2f56d65c80a4c36ea3bad6dc046c (patch)
treef7751da75030fb1e06653eeb44e579fcee09c65f /Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
parented0c7c756e441b2d2ba3633da233fc24361ac0d3 (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/pgfcorescopes.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex165
1 files changed, 84 insertions, 81 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
index b637ff10ded..558f715788c 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.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/pgfcorescopes.code.tex,v 1.26 2008/01/15 10:27:34 tantau Exp $
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorescopes.code.tex,v 1.34 2010/09/08 15:07:18 tantau Exp $
% Globals
@@ -31,82 +31,6 @@
-% Library files inclusion
-
-
-% Include a library file.
-%
-% #1 = List of names of library file.
-%
-% Description:
-%
-% This command includes a list of library files. For each file X in the
-% list, the file pgflibraryX.code.tex is included, provided this has
-% not been done earlier.
-%
-% For the convenience of Context users, both round and square brackets
-% are possible for the argument.
-%
-% Example:
-%
-% \usepgflibrary{arrows}
-% \usepgflibrary[patterns,snakes]
-
-\def\usepgflibrary{\pgfutil@ifnextchar[{\use@pgflibrary}{\use@@pgflibrary}}%}
-\def\use@pgflibrary[#1]{\use@@pgflibrary{#1}}
-\def\use@@pgflibrary#1{%
- \edef\pgf@list{#1}%
- \pgfutil@for\pgf@temp:=\pgf@list\do{%
- \expandafter\ifx\csname pgf@library@\pgf@temp @loaded\endcsname\relax%
- \expandafter\let\csname pgf@library@\pgf@temp @loaded\endcsname=\pgfutil@empty%
- \expandafter\edef\csname pgf@library@#1@atcode\endcsname{\the\catcode`\@}
- \expandafter\edef\csname pgf@library@#1@barcode\endcsname{\the\catcode`\|}
- \catcode`\@=11
- \catcode`\|=12
- \input pgflibrary\pgf@temp.code.tex
- \catcode`\@=\csname pgf@library@#1@atcode\endcsname
- \catcode`\|=\csname pgf@library@#1@barcode\endcsname
- \fi%
- }%
-}
-
-
-% Include a module file.
-%
-% #1 = List of names of module files.
-%
-% Description:
-%
-% This command includes a list of module files. For each file X in the
-% list, the file pgfmoduleX.code.tex is included, provided this has
-% not been done earlier.
-%
-% For the convenience of Context users, both round and square brackets
-% are possible for the argument.
-%
-% Example:
-%
-% \usepgfmodule{matrix}
-
-\def\usepgfmodule{\pgfutil@ifnextchar[{\use@pgfmodule}{\use@@pgfmodule}}%}
-\def\use@pgfmodule[#1]{\use@@pgfmodule{#1}}
-\def\use@@pgfmodule#1{%
- \edef\pgf@list{#1}%
- \pgfutil@for\pgf@temp:=\pgf@list\do{%
- \expandafter\ifx\csname pgf@module@\pgf@temp @loaded\endcsname\relax%
- \expandafter\let\csname pgf@module@\pgf@temp @loaded\endcsname=\pgfutil@empty%
- \expandafter\edef\csname pgf@module@#1@atcode\endcsname{\the\catcode`\@}
- \expandafter\edef\csname pgf@module@#1@barcode\endcsname{\the\catcode`\|}
- \catcode`\@=11
- \catcode`\|=12
- \input pgfmodule\pgf@temp.code.tex
- \catcode`\@=\csname pgf@module@#1@atcode\endcsname
- \catcode`\|=\csname pgf@module@#1@barcode\endcsname
- \fi%
- }%
-}
-
-
% Scopes
@@ -268,6 +192,13 @@
\newif\ifpgfpicture
+\def\pgfresetboundingbox{%
+ \global\pgf@picmaxx=-16000pt\relax%
+ \global\pgf@picminx=16000pt\relax%
+ \global\pgf@picmaxy=-16000pt\relax%
+ \global\pgf@picminy=16000pt\relax%
+}%
+
\def\pgfpicture{%
\begingroup%
\pgfpicturetrue%
@@ -306,7 +237,7 @@
\let\setlength=\pgf@setlength%
\let\addtolength=\pgf@addtolength%
\let\selectfont=\pgf@selectfont%
- \nullfont\spaceskip\z@\xspaceskip\z@%
+ \nullfont\spaceskip0pt\xspaceskip0pt%
\setbox\pgf@layerbox@main\hbox to0pt\bgroup%
\begingroup%
}
@@ -325,7 +256,21 @@
% Shift baseline outside:
\pgf@relevantforpicturesizefalse%
\pgf@process{\pgf@baseline}%
- \gdef\pgf@shift@baseline{\the\pgf@y}%
+ \xdef\pgf@shift@baseline{\the\pgf@y}%
+ %
+ \pgf@process{\pgf@trimleft}%
+ \global\advance\pgf@x by-\pgf@picminx
+ % prepare \hskip\pgf@trimleft@final.
+ % note that \pgf@trimleft@final is also queried
+ % by the pgf image externalization.
+ \xdef\pgf@trimleft@final{-\the\pgf@x}%
+ %
+ \pgf@process{\pgf@trimright}%
+ \global\advance\pgf@x by-\pgf@picmaxx
+ % prepare \hskip\pgf@trimright@final.
+ % note that \pgf@trimright@final is also queried
+ % by the pgf image externalization.
+ \xdef\pgf@trimright@final{\the\pgf@x}%
\endgroup%
\hss%
\egroup%
@@ -396,6 +341,7 @@
\pgfsetbaselinepointlater{\pgf@setter@baseline}%
}
+\def\pgf@default@text{default}%
% Sets the baseline
%
@@ -407,11 +353,65 @@
% Example:
%
% \pgfsetbaseline{1cm+2pt}
-
-\def\pgfsetbaseline#1{\pgfsetbaselinepointlater{\pgfpoint{0pt}{#1}}}
+% \pgfsetbaseline{default}% resets to default value
+
+\def\pgfsetbaseline#1{%
+ \def\pgf@temp{#1}%
+ \ifx\pgf@temp\pgf@default@text
+ \pgfsetbaseline{\pgf@picminy}%
+ \else
+ \pgfsetbaselinepointlater{\pgfpoint{0pt}{#1}}%
+ \fi
+}
\pgfsetbaseline{\pgf@picminy}
+% controls how the image externalization implements trim:
+\newif\ifpgf@trim@lowlevel
+\pgfkeys{
+ /pgf/trim lowlevel/.is if=pgf@trim@lowlevel,
+ /pgf/trim lowlevel/.default=true,
+}
+% Same as the y-baseline for horizontal alignment.
+% The effect is different, though: it is some kind of trimming which
+% leaves the bounding box intact.
+\def\pgfsettrimleftpointlater#1{\def\pgf@trimleft{#1}}
+\def\pgfsettrimleftpointnow#1{%
+ \pgf@process{#1}%
+ \edef\pgf@setter@baseline{\noexpand\pgfpoint{\the\pgf@x}{\the\pgf@y}}%
+ \pgfsettrimleftpointlater{\pgf@setter@baseline}%
+}
+% \pgfsettrimleft{<x coord>}
+% or
+% \pgfsettrimleft{default}
+\def\pgfsettrimleft#1{%
+ \def\pgf@temp{#1}%
+ \ifx\pgf@temp\pgf@default@text
+ \pgfsettrimleft{\pgf@picminx}
+ \else
+ \pgfsettrimleftpointlater{\pgfpoint{#1}{0pt}}%
+ \fi
+}
+\pgfsettrimleft{\pgf@picminx}
+
+\def\pgfsettrimrightpointlater#1{\def\pgf@trimright{#1}}
+\def\pgfsettrimrightpointnow#1{%
+ \pgf@process{#1}%
+ \edef\pgf@setter@baseline{\noexpand\pgfpoint{\the\pgf@x}{\the\pgf@y}}%
+ \pgfsettrimrightpointlater{\pgf@setter@baseline}%
+}
+% \pgfsettrimright{<x coord>}
+% or
+% \pgfsettrimright{default}
+\def\pgfsettrimright#1{%
+ \def\pgf@temp{#1}%
+ \ifx\pgf@temp\pgf@default@text
+ \pgfsettrimright{\pgf@picmaxx}%
+ \else
+ \pgfsettrimrightpointlater{\pgfpoint{#1}{0pt}}%
+ \fi
+}
+\pgfsettrimright{\pgf@picmaxx}
% Interrupt path
@@ -489,6 +489,8 @@
\pgf@picminx=16000pt\relax%
\pgf@picmaxy=-16000pt\relax%
\pgf@picminy=16000pt\relax%
+ \pgf@size@hookedfalse%
+ \let\pgf@path@size@hook=\pgfutil@empty%
}
\def\endpgfinterruptboundingbox
{%
@@ -554,6 +556,7 @@
\fi%
\pgfutil@selectfont%
\pgfpicturefalse%
+ \let\pgf@positionnodelater@macro\relax%
\pgf@savelayers%
}
\def\endpgfinterruptpicture