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.tex64
1 files changed, 59 insertions, 5 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 ae982952815..47b876cd1b1 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
@@ -637,8 +637,10 @@ done.
\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}%
+ \marg{name}\marg{$x_1$}\marg{$y_1$}\marg{$x_2$}\marg{$y_2$}%
+ \marg{$x$ step}\marg{$y$ step}%
+ \marg{$a$}\marg{$b$}\marg{$c$}\marg{$d$}\allowbreak\marg{$e$}\marg{$f$}%
+ \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
@@ -652,14 +654,66 @@ done.
The tiling step of the pattern is given by \meta{$x$ step} and \meta{$y$
step}.
+ The parameters \meta{$a$} to \meta{$f$} are entries of the transformation
+ matrix that is applied to the pattern, see |\pgfsys@patternmatrix| for more
+ information.
+
\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}
+\pgfsys@declarepattern
+ {hori}{-.5pt}{0pt}{.5pt}{3pt}{3pt}{3pt}%
+ {1.0}{0.0}{0.0}{1.0}{0.0pt}{0.0pt}%
+ {\pgfsys@moveto{0pt}{0pt}\pgfsys@lineto{0pt}{3pt}\pgfsys@stroke}
+ {0}
+\end{codeexample}
+ %
+\end{command}
+
+
+\begin{command}{\pgfsys@patternmatrix}
+ For convenience \pgfname\ defines the transformation matrix that is applied
+ to all patterns defined with |\pgfdeclarepatternformonly| and
+ |\pgfdeclarepatterninherentlycolored| in a macro. This can be used as an
+ extension point for ad-hoc transformation of existing patterns. The
+ default definition is the
+ identity matrix:
+ %
+\begin{codeexample}[code only]
+\def\pgfsys@patternmatrix{{1.0}{0.0}{0.0}{1.0}{0.0pt}{0.0pt}}
\end{codeexample}
%
+ The entries of the enclosed array
+ |{|\meta{$a$}|}{|\meta{$b$}|}{|\meta{$c$}|}{|\meta{$d$}|}{|\meta{$e$}|}{|\meta{$f$}|}|
+ are entries in the transformation matrix, identified as in the following
+ transformation prescription:
+ \begin{equation*}
+ \begin{pmatrix}
+ x' \\
+ y' \\
+ 1 \\
+ \end{pmatrix}
+ =
+ \begin{pmatrix}
+ a & c & e \\
+ b & d & f \\
+ 0 & 0 & 1 \\
+ \end{pmatrix}
+ \begin{pmatrix}
+ x \\
+ y \\
+ 1 \\
+ \end{pmatrix} .
+ \end{equation*}
+ Carrying out the matrix multiplication results in the following system of
+ equations
+ \begin{align*}
+ x' &= a x + c y + e , \\
+ y' &= b x + d y + f .
+ \end{align*}
+ Evidently, the parameters \marg{$a$} to \marg{$d$} have to be dimensionless
+ because they are scaling factors, but the parameters \marg{$e$} and
+ \marg{$f$} are offsets, therefore they have to carry a unit.
\end{command}
\begin{command}{\pgfsys@setpatternuncolored\marg{name}\marg{red}\marg{green}\marg{blue}}