File: pgfmanual-en-library-fadings.tex

package info (click to toggle)
texlive-base 2022.20230122-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 943,248 kB
  • sloc: perl: 43,776; sh: 5,749; makefile: 3,870; javascript: 3,034; ruby: 2,266; tcl: 2,130; xml: 1,874; python: 1,025; awk: 606; cpp: 549; lisp: 447; ansic: 103; sed: 8
file content (51 lines) | stat: -rw-r--r-- 1,524 bytes parent folder | download | duplicates (5)
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: