summaryrefslogtreecommitdiff
path: root/graphics/pgf/base/doc/text-en/pgfmanual-en-base-transparency.tex
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/base/doc/text-en/pgfmanual-en-base-transparency.tex')
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-base-transparency.tex14
1 files changed, 10 insertions, 4 deletions
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-base-transparency.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-base-transparency.tex
index 22156f98d3..319ebbd9e6 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-base-transparency.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-base-transparency.tex
@@ -218,7 +218,9 @@ different commands for using fadings:
\end{tikzpicture}
\end{codeexample}
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\pgfdeclarefading{fading2}
+{\tikz \shade[left color=pgftransparent!0,
+ right color=pgftransparent!100] (0,0) rectangle (2,2);}}]
\begin{tikzpicture}
\fill [black!20] (0,0) rectangle (2,2);
\fill [black!30] (0,0) arc (180:0:1);
@@ -284,7 +286,11 @@ different commands for using fadings:
current path will be stroked, this much needs to be added around the path's
bounding box to actually contain the path.
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\pgfdeclarehorizontalshading{shading}{100bp}
+{ color(0pt)=(transparent!0); color(25bp)=(transparent!0);
+ color(75bp)=(transparent!100); color(100bp)=(transparent!100)}
+%
+\pgfdeclarefading{fading}{\pgfuseshading{shading}}}]
\begin{tikzpicture}
\pgfsetlinewidth{2mm}
\pgfpathmoveto{\pgfpointorigin}
@@ -350,8 +356,8 @@ Transparency groups are declared using the following commands.
while ignoring the size. The following example shows how this is done:
% TODO: Nesting tikzpictures is NOT supported
-{\tikzexternaldisable
-\begin{codeexample}[]
+{\ifpgfmanualexternalize\tikzexternaldisable\fi
+\begin{codeexample}[preamble={\usetikzlibrary{shapes.symbols}}]
\begin{tikzpicture}
\draw [help lines] (0,0) grid (2,2);