summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transparency.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transparency.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transparency.tex80
1 files changed, 41 insertions, 39 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transparency.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transparency.tex
index ba56a91a53e..5f7eba71c8c 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transparency.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transparency.tex
@@ -26,7 +26,7 @@ obscure the background, rather they blend the background with the new
color. At first sight, using such semitransparent colors might seem quite
straightforward, but the math going on in the background is quite
involved and the correct handling of transparency fills some 64 pages
-in the PDF specification.
+in the PDF specification.
In the present section, we start with the different ways of specifying
``how transparent'' newly drawn objects should be. The simplest way is
@@ -34,7 +34,7 @@ to just specify a percentage like ``60\% transparent.'' A much more
general way is to use something that I call a \emph{fading,} also
known as a soft mask or a mask.
-At the end of the section we adress the problem of creating so-called
+At the end of the section we address the problem of creating so-called
\emph{transparency groups}. This problem arises when you paint over a
position several times with a semitransparent color. Sometimes you
want the effect to accumulate, sometimes you do not.
@@ -42,8 +42,8 @@ want the effect to accumulate, sometimes you do not.
\emph{Note:} Transparency is best supported by the pdf\TeX\
driver. The \textsc{svg} driver also has some support. For PostScript
output, opacity is rendered correctly only with the most recent
-versions of GhostScript. Printers and other programs will typically
-ignore the opacity setting.
+versions of Ghostscript. Printers and other programs will typically
+ignore the opacity setting.
@@ -60,8 +60,8 @@ following options.
yields lines that are semitransparent.
Note that when you use PostScript as your output format,
- this option works only with recent versions of GhostScript.
-
+ this option works only with recent versions of Ghostscript.
+
\begin{codeexample}[]
\begin{tikzpicture}[line width=1ex]
\draw (0,0) -- (3,1);
@@ -73,7 +73,7 @@ following options.
Note that the |draw opacity| options only sets the opacity of drawn
lines. The opacity of fillings is set using the option
|fill opacity| (documented in Section~\ref{section-fill-opacity}. The
-option |opacity| sets both at the same time.
+option |opacity| sets both at the same time.
\begin{key}{/tikz/opacity=\meta{value}}
Sets both the drawing and filling opacity to \meta{value}.
@@ -111,21 +111,21 @@ option |opacity| sets both at the same time.
\end{codeexample}
\end{stylekey}
- \begin{stylekey}{/tikz/semitransparent}
+ \begin{stylekey}{/tikz/semitransparent}
\begin{codeexample}[]
\tikz{\fill[red] (0,0) rectangle (1,0.5);
\fill[semitransparent] (0.5,0) rectangle (1.5,0.25); }
\end{codeexample}
\end{stylekey}
- \begin{stylekey}{/tikz/nearly opaque}
+ \begin{stylekey}{/tikz/nearly opaque}
\begin{codeexample}[]
\tikz{\fill[red] (0,0) rectangle (1,0.5);
\fill[nearly opaque] (0.5,0) rectangle (1.5,0.25); }
\end{codeexample}
\end{stylekey}
-
- \begin{stylekey}{/tikz/very nearly opaque}
+
+ \begin{stylekey}{/tikz/very nearly opaque}
\begin{codeexample}[]
\tikz{\fill[red] (0,0) rectangle (1,0.5);
\fill[very nearly opaque] (0.5,0) rectangle (1.5,0.25); }
@@ -154,8 +154,8 @@ option |opacity| sets both at the same time.
operations, this opacity also applies to text and images.
Note, again, that when you use PostScript as your output format,
- this option works only with recent versions of GhostScript.
-
+ this option works only with recent versions of Ghostscript.
+
\begin{codeexample}[]
\begin{tikzpicture}[thick,fill opacity=0.5]
\filldraw[fill=red] (0:1cm) circle (12mm);
@@ -175,7 +175,7 @@ option |opacity| sets both at the same time.
\end{key}
\begin{key}{/tikz/text opacity=\meta{value}}
- Sets the opacity of text labels, overriding the |fill opacity| setting.
+ Sets the opacity of text labels, overriding the |fill opacity| setting.
\begin{codeexample}[]
\begin{tikzpicture}[every node/.style={fill,draw}]
\draw[line width=2mm,blue!50,line cap=round] (0,0) grid (3,2);
@@ -224,12 +224,12 @@ each point of an area to transparency of the point. This transparency
can by any number between 0 and 1. A \emph{fading picture} is a normal
graphic that, in a way to be described in a moment, determines the
transparency of points inside the fading. Each fading has an
-underlying fading picture.
+underlying fading picture.
The fading picture is a normal graphic drawn using any of the normal
graphic drawing commands. A fading and its fading picture are related
as follows: Given any point of the fading, the transparency of this
-point is determined by the lumonisity of the fading picture at the
+point is determined by the luminosity of the fading picture at the
same position. The luminosity of a point determines ``how bright'' the
point is. The brighter the point in the fading picture, the more
opaque is the point in the fading. In particular, a white point of the
@@ -244,7 +244,7 @@ will be \emph{transparent}. For this reason, \tikzname\ defines a
color called |transparent| that is the same as |black|. The nice thing
about this definition is that the color
|transparent!|\meta{percentage} in the fading picture yields a
-pixel that is \meta{percantage} per cent transparent in the fading.
+pixel that is \meta{percentage} per cent transparent in the fading.
Turning a fading picture into a normal picture is achieved using the
following commands, which are \emph{only defined in the library},
@@ -260,10 +260,11 @@ namely the library |fadings|. So, to use them, you have to say
Use this option with the |{tikzfadingfrompicture}| environment to
set the name of the fading. You \emph{must} provide this option.
\end{key}
-
+
The following shading is 2cm by 2cm and changes gets more and more
transparent from left to right, but is 50\% transparent for a large
circle in the middle.
+{\tikzexternaldisable
\begin{codeexample}[]
\begin{tikzfadingfrompicture}[name=fade right]
\shade[left color=transparent!0,
@@ -277,13 +278,13 @@ namely the library |fadings|. So, to use them, you have to say
\fill [black!20] (-1.2,-1.2) rectangle (1.2,1.2);
\pattern [pattern=checkerboard,pattern color=black!30]
(-1.2,-1.2) rectangle (1.2,1.2);
-
+
\fill [path fading=fade right,red] (-1,-1) rectangle (1,1);
\end{tikzpicture}
\end{codeexample}
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.''
+ it.''
\begin{codeexample}[]
\begin{tikzfadingfrompicture}[name=tikz]
\node [text=transparent!20]
@@ -301,6 +302,7 @@ namely the library |fadings|. So, to use them, you have to say
(-2,-1) rectangle (2,1);
\end{tikzpicture}
\end{codeexample}
+}%
\end{environment}
\begin{plainenvironment}{{tikzfadingfrompicture}\oarg{options}}
@@ -313,7 +315,7 @@ namely the library |fadings|. So, to use them, you have to say
\begin{command}{\tikzfading\oarg{options}}
This command is used to define a fading similarly to that way a
- shading is defined. In the \meta{options} you should
+ shading is defined. In the \meta{options} you should
\begin{enumerate}
\item use the |name=|\meta{name} option to set a name for the fading,
\item use the |shading| option to set the name of the shading that
@@ -338,7 +340,7 @@ namely the library |fadings|. So, to use them, you have to say
\fill [red,path fading=fade right] (-1,-1) rectangle (1,1);
\end{tikzpicture}
-\end{codeexample}
+\end{codeexample}
\begin{codeexample}[]
\tikzfading[name=fade out,
@@ -354,7 +356,7 @@ namely the library |fadings|. So, to use them, you have to say
\fill [blue,path fading=fade out] (-1,-1) rectangle (1,1);
\end{tikzpicture}
-\end{codeexample}
+\end{codeexample}
\end{command}
@@ -363,7 +365,7 @@ namely the library |fadings|. So, to use them, you have to say
Aa fading specifies for each pixel of a certain area how transparent
this pixel will be. The following options are used to install such a
-fading for the current scope or path.
+fading for the current scope or path.
\pgfdeclarefading{fade down}{%
\tikzset{top color=pgftransparent!0,bottom color=pgftransparent!100}
@@ -376,7 +378,7 @@ fading for the current scope or path.
\begin{key}{/tikz/path fading=\meta{name} (default \normalfont scope's setting)}
This option tells \tikzname\ that the current path should be faded
- with the fading \meta{name}. If no \meta{name} is given, the
+ with the fading \meta{name}. If no \meta{name} is given, the
\meta{name} set for the whole scope is used. Similarly to options
like |draw| or |fill|, this option is reset for each path, so you
have to add it to each path that should be faded. You can also
@@ -404,7 +406,7 @@ fading for the current scope or path.
path. When set to |false|, the fading is only shifted so that it
is centered on the path's center, but it is not resized. This can
be useful for special-purpose fadings, for instance when you use a
- fading to ``punsh out'' something.
+ fading to ``punsh out'' something. % TODOsp: punsh out --> punch out??
\end{key}
\begin{key}{/tikz/fading transform=\meta{transformation options}}
@@ -424,14 +426,14 @@ fading for the current scope or path.
\end{tikzpicture}
\end{codeexample}
\end{key}
-
+
\begin{key}{/tikz/fading angle=\meta{degree}}
A shortcut for |fading transform={rotate=|\meta{degree}|}|.
\end{key}
Note that you can ``fade just about anything.'' In particular, you
can fade a shading.
-
+
\begin{codeexample}[]
\begin{tikzpicture}
% Checker board
@@ -448,7 +450,7 @@ fading for the current scope or path.
\begin{codeexample}[]
\tikzfading[name=fade inside,
inner color=transparent!80,
- outer color=transparent!30]
+ outer color=transparent!30]
\begin{tikzpicture}
% Checker board
\fill [black!20] (0,0) rectangle (4,4);
@@ -488,7 +490,7 @@ visually rather pleasing effects:
\subsubsection{Fading a Scope}
-In addtion to fading individual paths, you may also wish to ``fade a
+In addition to fading individual paths, you may also wish to ``fade a
scope,'' that is, you may wish to install a fading that is used
globally to specify the transparency for all objects drawn inside a
scope. This effect can also be thought of as a ``soft clip'' and it
@@ -498,7 +500,7 @@ in the scope are faded. You will use a |transparency group| in
conjunction, see the end of this section.
\begin{key}{/tikz/scope fading=\meta{fading}}
- In principle, this key works in excatly the same way as the
+ In principle, this key works in exactly the same way as the
|path fading| key. The only difference is, that the effect of the
fading will persist after the current path till the end of the
scope. Thus, the \meta{fading} is applied to all subsequent drawings
@@ -512,7 +514,7 @@ conjunction, see the end of this section.
the |scope fading| option with a |{scope}| only sets the name of the
fading to be used. You have to explicitly provide the |scope fading|
with a path to actually install a fading.
-
+
\begin{codeexample}[]
\begin{tikzpicture}
\fill [black!20] (-2,-2) rectangle (2,2);
@@ -554,7 +556,7 @@ conjunction, see the end of this section.
This is some text that will fade out as we go right
and down. It is pretty hard to achieve this effect in
other ways.
-};
+};
\end{codeexample}
\end{key}
@@ -564,7 +566,7 @@ conjunction, see the end of this section.
Consider the following cross and sign. They ``look wrong'' because we
can see how they were constructed, while this is not really part of
-the desired effect.
+the desired effect.
\begin{codeexample}[]
\begin{tikzpicture}[opacity=.5]
@@ -615,9 +617,9 @@ Transparency groups are used to render them correctly:
are painted multiple times (up to three times), but only the last
color ``wins.''
- Then, when the scope is finished, it is painted as a whole. The
+ Then, when the scope is finished, it is painted as a whole. The
\emph{fill} transparency settings are now applied to the resulting
- picutre. For instance, the pixel that has been painted three times
+ picture. For instance, the pixel that has been painted three times
is just red at the end, so this red color will be blended with
whatever is ``behind'' the group on the page.
@@ -625,12 +627,12 @@ Transparency groups are used to render them correctly:
objects in a transparency group that lie outside the picture. This
has to do with internal bounding box computations.
Section~\ref{section-transparency} explains how to sidestep this
- problem.
+ problem.
\end{key}
-%%% Local Variables:
+%%% Local Variables:
%%% mode: latex
%%% TeX-master: "pgfmanual"
-%%% End:
+%%% End: