diff options
Diffstat (limited to 'graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-transparency.tex')
-rw-r--r-- | graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-transparency.tex | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-transparency.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-transparency.tex index b93d2f2003..0483ee57ad 100644 --- a/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-transparency.tex +++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-tikz-transparency.tex @@ -424,8 +424,8 @@ commands, which are \emph{only defined in the library}, namely the library The following shading is 2cm by 2cm and gets more and more transparent from left to right, but is 50\% transparent for a large circle in the middle. % -{\tikzexternaldisable -\begin{codeexample}[] +{\ifpgfmanualexternalize\tikzexternaldisable\fi +\begin{codeexample}[preamble={\usetikzlibrary{fadings,patterns}}] \begin{tikzfadingfrompicture}[name=fade right] \shade[left color=transparent!0, right color=transparent!100] (0,0) rectangle (2,2); @@ -446,7 +446,7 @@ commands, which are \emph{only defined in the library}, namely the library In the next example we create a fading picture that contains some text. When the fading is used, we only see the shading ``through it''. % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{fadings,patterns}}] \begin{tikzfadingfrompicture}[name=tikz] \node [text=transparent!20] {\fontencoding{T1}\fontfamily{ptm}\fontsize{45}{45}\bfseries\selectfont Ti\emph{k}Z}; @@ -491,7 +491,7 @@ commands, which are \emph{only defined in the library}, namely the library % Then, a new fading named \meta{name} will be created based on the shading. % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{fadings,patterns}}] \tikzfading[name=fade right, left color=transparent!0, right color=transparent!100] @@ -507,7 +507,7 @@ commands, which are \emph{only defined in the library}, namely the library \end{tikzpicture} \end{codeexample} -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{fadings,patterns}}] \tikzfading[name=fade out, inner color=transparent!0, outer color=transparent!100] @@ -550,7 +550,7 @@ current scope or path. fading for the path will be switched off in case it has been switched on by previous options or styles. % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{fadings,patterns}}] \begin{tikzpicture}[path fading=south] % Checker board \fill [black!20] (0,0) rectangle (4,3); @@ -579,7 +579,12 @@ current scope or path. is used. For instance, if \meta{transformation options} is set to |rotate=90|, the fading is rotated by 90 degrees. % -\begin{codeexample}[] +\begin{codeexample}[ + preamble={\usetikzlibrary{fadings,patterns}}, + pre={\pgfdeclarefading{fade down}{% + \tikzset{top color=pgftransparent!0,bottom color=pgftransparent!100} + \pgfuseshading{axis} +}}] \begin{tikzpicture}[path fading=fade down] % Checker board \fill [black!20] (0,0) rectangle (4,1.5); @@ -600,7 +605,7 @@ current scope or path. Note that you can ``fade just about anything''. In particular, you can fade a shading. % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{fadings,patterns}}] \begin{tikzpicture} % Checker board \fill [black!20] (0,0) rectangle (4,4); @@ -613,7 +618,7 @@ current scope or path. The |fade inside| of the following example is more transparent in the middle than on the outside. % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{fadings,patterns}}] \tikzfading[name=fade inside, inner color=transparent!80, outer color=transparent!30] @@ -635,7 +640,7 @@ current scope or path. Note that using fadings in conjunction with patterns can create visually rather pleasing effects: % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{fadings,patterns,shadows}}] \tikzfading[name=middle, top color=transparent!50, bottom color=transparent!50, @@ -680,7 +685,7 @@ then all subsequent drawings in the scope are faded. You will use a be used. You have to explicitly provide the |scope fading| with a path to actually install a fading. % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{fadings,patterns}}] \begin{tikzpicture} \fill [black!20] (-2,-2) rectangle (2,2); \pattern [pattern=checkerboard,pattern color=black!30] @@ -701,7 +706,7 @@ then all subsequent drawings in the scope are faded. You will use a In the following example we resize the fading to the size of the whole picture: % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{fadings,patterns}}] \begin{tikzpicture} \fill [black!20] (-2,-2) rectangle (2,2); \pattern [pattern=checkerboard,pattern color=black!30] @@ -717,7 +722,7 @@ then all subsequent drawings in the scope are faded. You will use a Scope fadings are also needed if you wish to fade a node. % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{fadings}}] \tikz \node [scope fading=south,fading angle=45,text width=3.5cm] { This is some text that will fade out as we go right @@ -742,7 +747,7 @@ how they were constructed, while this is not really part of the desired effect. \end{tikzpicture} \end{codeexample} -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{shapes.symbols}}] \begin{tikzpicture} \node at (0,0) [forbidden sign,line width=2ex,draw=red,fill=white] {Smoking}; @@ -762,7 +767,7 @@ Transparency groups are used to render them correctly: \end{tikzpicture} \end{codeexample} -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{shapes.symbols}}] \begin{tikzpicture} \node at (0,0) [forbidden sign,line width=2ex,draw=red,fill=white] {Smoking}; @@ -789,7 +794,7 @@ Transparency groups are used to render them correctly: end, so this red color will be blended with whatever is ``behind'' the group on the page. % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{patterns,shapes.symbols}}] \begin{tikzpicture} \pattern[pattern=checkerboard,pattern color=black!15](-1,-1) rectangle (3,1); \node at (0,0) [forbidden sign,line width=2ex,draw=red,fill=white] {Smoking}; @@ -808,7 +813,7 @@ Transparency groups are used to render them correctly: open another scope inside it or use the |opacity| key with a command inside the group: % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{patterns,shapes.symbols}}] \begin{tikzpicture} \pattern[pattern=checkerboard,pattern color=black!15](-1,-1) rectangle (3,1); \node at (0,0) [forbidden sign,line width=2ex,draw=red,fill=white] {Smoking}; |