diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transformations.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transformations.tex | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transformations.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transformations.tex index 2cd4553dfef..67525cd3048 100644 --- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transformations.tex +++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transformations.tex @@ -806,6 +806,7 @@ can become curved since \emph{everything} gets transformed. \subsubsection{Installing Nonlinear Transformation} +\begin{codeexample}[setup code,hidden] \makeatletter \def\polartransformation{ % \pgf@x will contain the radius @@ -817,6 +818,7 @@ can become curved since \emph{everything} gets transformed. \pgf@y=\pgfmathresulty\pgf@y% } \makeatother +\end{codeexample} \begin{command}{\pgftransformnonlinear\marg{transformation code}} This command adds the \meta{transformation code} to the list of non-linear @@ -856,7 +858,7 @@ can become curved since \emph{everything} gets transformed. transformation. In particular, a normal grid now becomes the typical ``polar grid''. % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usepgfmodule{nonlineartransformations}}] \begin{tikzpicture} \draw [help lines] (0,0) grid (3,2); % Start nonlinear transformation @@ -908,7 +910,7 @@ while a nonlinear transformation is installed: Note that this mapping is actually not quite satisfactory for long lines that are strongly curved: % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usepgfmodule{nonlineartransformations}}] \begin{tikzpicture} \draw [help lines] (0,0) grid (3,2); { @@ -940,7 +942,7 @@ while a nonlinear transformation is installed: (for them, splitting may occur again, if the curve is still too long). % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usepgfmodule{nonlineartransformations}}] \begin{tikzpicture} \draw [help lines] (0,0) grid (3,2); \draw[red] (0:20mm) arc [start angle=0, end angle=90, radius=2cm]; @@ -968,7 +970,7 @@ is longer, it will not ``follow'' the nonlinear transformation, but near the origin of the text it will look ``correct''. As an example, let us add some text at the grid point of the above example: % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usepgfmodule{nonlineartransformations}}] \begin{tikzpicture} \draw [help lines] (0,0) grid (3,2); \pgftransformnonlinear{\polartransformation}% see above @@ -1005,7 +1007,7 @@ such a local approximation: look almost the same as if you had not called it. \end{enumerate} % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usepgfmodule{nonlineartransformations}}] \begin{tikzpicture} \draw [help lines] (0,0) grid (3,2); \pgftransformnonlinear{\polartransformation}% see above @@ -1035,7 +1037,7 @@ such a local approximation: rotation, skewing, or scaling that is involved. This is useful for drawing text at the right position, but without ``mutilating'' the text. % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usepgfmodule{nonlineartransformations}}] \begin{tikzpicture} \draw [help lines] (0,0) grid (3,2); \pgftransformnonlinear{\polartransformation}% see above @@ -1117,7 +1119,10 @@ commands that offer the necessary computations for such transformations. |\pgftransformnonlinear| for details. % \makeatletter -\begin{codeexample}[] +\begin{codeexample}[ + preamble={\usepgfmodule{nonlineartransformations} +\usetikzlibrary{curvilinear}}, + pre=\makeatletter] \begin{tikzpicture} \draw [help lines] (0,0) grid (3,2); { @@ -1134,7 +1139,10 @@ commands that offer the necessary computations for such transformations. \end{tikzpicture} \end{codeexample} -\begin{codeexample}[] +\begin{codeexample}[ + preamble={\usepgfmodule{nonlineartransformations} +\usetikzlibrary{curvilinear}}, + pre=\makeatletter] \begin{tikzpicture} \draw [help lines] (0,0) grid (3,2); { @@ -1171,7 +1179,10 @@ commands that offer the necessary computations for such transformations. lines. % \makeatletter -\begin{codeexample}[] +\begin{codeexample}[ + preamble={\usepgfmodule{nonlineartransformations} +\usetikzlibrary{curvilinear}}, + pre=\makeatletter] \begin{tikzpicture} \draw [help lines] (0,0) grid (3,2); { @@ -1190,7 +1201,10 @@ commands that offer the necessary computations for such transformations. \end{tikzpicture} \end{codeexample} -\begin{codeexample}[] +\begin{codeexample}[ + preamble={\usepgfmodule{nonlineartransformations} +\usetikzlibrary{curvilinear}}, + pre=\makeatletter] \begin{tikzpicture} \draw [help lines] (0,0) grid (3,2); { |