summaryrefslogtreecommitdiff
path: root/graphics/pgf/base/doc/text-en/pgfmanual-en-library-fadings.tex
blob: 3b0784e441f191c2d42456ffa1e652d1425085cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
% Copyright 2018 by Till Tantau
%
% 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{Fading Library}
\label{section-library-fadings}

\begin{pgflibrary}{fadings}
    The package defines a number of fadings, see
    Section~\ref{section-tikz-transparency} for an introduction.  The
    \tikzname\ version defines special \tikzname\ commands for creating
    fadings. These commands are explained in
    Section~\ref{section-tikz-transparency}.
\end{pgflibrary}

\newcommand\fadingindex[1]{%
  \index{#1@\protect\texttt{#1} fading}%
  \index{Fadings!#1@\protect\texttt{#1}}%
  \texttt{#1}&
  \begin{tikzpicture}[baseline=5mm-.5ex]
    \fill [black!20] (0,0) rectangle (1,1);
    \path [pattern=checkerboard,pattern color=black!30] (0,0) rectangle (1,1);

    \fill [path fading=#1,blue] (0,0) rectangle (1,1);
  \end{tikzpicture} \\[4.5mm]
}

\noindent
\begin{tabular}{ll}
    \emph{Fading name} & \emph{Example (solid blue faded on checkerboard)} \\[1mm]
    \fadingindex{west}
    \fadingindex{east}
    \fadingindex{north}
    \fadingindex{south}
    \fadingindex{circle with fuzzy edge 10 percent}
    \fadingindex{circle with fuzzy edge 15 percent}
    \fadingindex{circle with fuzzy edge 20 percent}
    \fadingindex{fuzzy ring 15 percent}
\end{tabular}


%%% Local Variables:
%%% mode: latex
%%% TeX-master: "pgfmanual-pdftex-version"
%%% End: