summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgfsys-commands.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgfsys-commands.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgfsys-commands.tex133
1 files changed, 129 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgfsys-commands.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgfsys-commands.tex
index 743e357485c..fb302c207b6 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgfsys-commands.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgfsys-commands.tex
@@ -1,8 +1,12 @@
-% Copyright 2003 by Till Tantau <tantau@cs.tu-berlin.de>.
+% Copyright 2006 by Till Tantau
%
-% This program can be redistributed and/or modified under the terms
-% of the LaTeX Project Public License Distributed from CTAN
-% archives in directory macros/latex/base/lppl.txt.
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Free Documentation License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
\section{Commands of the System Layer}
@@ -612,6 +616,52 @@ whenever a stroking or a filling operation is done.
\end{command}
+
+
+\subsection{Pattern System Commands}
+
+
+\begin{command}{\pgfsys@declarepattern
+ \marg{name}\marg{$x_1$}\marg{$y_1$}\marg{$x_2$}\marg{$y_2$}
+ \marg{$x$ step}\marg{$y$ step}\marg{code}\marg{flag}}
+ This command declares a new colored or uncolored pattern, depending
+ on whether \meta{flag} is |0|, which means uncolored, or |1|, which
+ means colored. Uncolored patterns have no inherent color, the color
+ is provided when they are set. Colored patters have an inherent
+ color.
+
+ The \meta{name} is a name for later use when the pattern is to be
+ shown. The pairs $(x_1,y_1)$ and $(x_2,y_2)$ must describe a
+ bounding box of the pattern \meta{code}.
+
+ The tiling step of the pattern is given by \meta{$x$ step} and
+ \meta{$y$ step}.
+
+ \example
+\begin{codeexample}[code only]
+\pgfsys@declarepattern{hori}{-.5pt}{0pt}{.5pt}{3pt}{3pt}{3pt}
+{\pgfsys@moveto{0pt}{0pt}\pgfsys@lineto{0pt}{3pt}\pgfsys@stroke}
+{0}
+\end{codeexample}
+\end{command}
+
+\begin{command}{\pgfsys@setpatternuncolored\marg{name}\marg{red}\marg{green}\marg{blue}}
+ Sets the fill color to the pattern named \meta{name}. This pattern
+ must previously have been declared with \meta{flag} set to |0|. The
+ color of the pattern is given in the parameters \meta{red},
+ \meta{green}, and \meta{blue} in the usual way.
+
+ The fill color ``pattern'' will persist till the next color command
+ that modifies the fill color.
+\end{command}
+
+\begin{command}{\pgfsys@setpatterncolored\marg{name}}
+ Sets the fill color to the pattern named \meta{name}. This pattern
+ must have been declared with the |1| flag.
+\end{command}
+
+
+
\subsection{Scoping System Commands}
The scoping commands are used to keep changes of the graphics state
@@ -837,6 +887,81 @@ commands do not open a graphics scope and can be opened and closed
\end{command}
+\subsection{Position Tracking Commands}
+
+The following commands are used to determine the position of text on a
+page. This is a rather complicated process in general since at the
+moment when the text is read by \TeX\ the final position cannot be
+determined, yet. For example, the text might be put in a box which is
+later put in the headline or perhaps in the footline or perhaps even
+on a different page.
+
+For these reasons, position tracking is typically a two-stage
+process. In a first stage you indicate that a certain position is of
+interest by \emph{marking} it. This will (depending on the details of
+the backend driver) cause page coordinates or this position to be
+written to a |.aux| file when the page is shipped. Possibly, the
+position might also be determined at an even later stage. Then, on a
+second run of \TeX, the position is read from the |.aux| file and can
+be used.
+
+\begin{command}{\pgfsys@markposition\marg{name}}
+ Marks a position on the page. This command should be given while
+ normal typesetting is done such as in
+\begin{codeexample}[code only]
+The value of $x$ is \pgfsys@markposition{here}important.
+\end{codeexample}
+ It causes the position |here| to be saved when the page is shipped
+ out.
+\end{command}
+
+\begin{command}{\pgfsys@getposition\marg{name}\marg{macro}}
+ This command retrieves a position that has been marked on an earlier
+ run of \TeX\ on the current file. The \meta{macro} must be a macro
+ name such as |\mymarco|. It will redefined such that it is
+ \begin{itemize}
+ \item either just |\relax| or
+ \item a |\pgfpoint...| command.
+ \end{itemize}
+ The first case will happen when the position has not been marked at
+ all or when the file is typeset for the first time, when the
+ coordinates are not yet available.
+
+ In the second case, executing \meta{macro} yields the position on
+ the page that is to be interpreted as follows: A coordinate like
+ |\pgfpoint{2cm}{3cm}| means ``2cm to the right and 3cm up from the
+ origin of the page.'' The position of the origin of the page is not
+ guaranteed to be at the lower left corner, it is only guaranteed
+ that all pictures on a page use the same origin.
+
+ To determine the lower left corner of a page, you can call
+ |\pgfsys@getposition| with \meta{name} set to the special name
+ |pgfpageorigin|. By shifting all positions by the amount returned by
+ this call you can position things absolutely on a page.
+
+ \example Referencing a point or the page:
+\begin{codeexample}[code only]
+The value of $x$ is \pgfsys@markposition{here}important.
+
+Lots of text.
+
+\hbox{\pgfsys@markposition{myorigin}%
+\begin{pgfpicture}
+ % Switch of size protocol
+ \pgfpathmoveto{\pgfpointorigin}
+ \pgfusepath{use as bounding box}
+
+ \pgfsys@getposition{here}{\hereposition}
+ \pgfsys@getposition{myorigin}{\thispictureposition}
+
+ \pgftransformshift{\pgfpointscale{-1}{\thispictureposition}}
+ \pgftransformshift{\hereposition}
+
+ \pgfpathcircle{\pgfpointorigin}{1cm}
+ \pgfusepath{draw}
+\end{pgfpicture}}
+\end{codeexample}
+\end{command}
\subsection{Internal Conversion Commands}