summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transparency.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-02-27 00:01:50 +0000
committerKarl Berry <karl@freefriends.org>2014-02-27 00:01:50 +0000
commit90ae413a94da014dbf7a6a8ab584f7c668483a5a (patch)
tree4e0528a2b2fb2004988e7fc804ea2f1354f1f5d5 /Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transparency.tex
parent800cc56380d1edfe567a6a66bef13e8950eb2b0c (diff)
pgf 3.0.0
git-svn-id: svn://tug.org/texlive/trunk@33057 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transparency.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transparency.tex72
1 files changed, 63 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transparency.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transparency.tex
index a286fcfcd34..1243597df54 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transparency.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-transparency.tex
@@ -56,7 +56,7 @@ Specifying a stroke and/or fill opacity is quite easy.
\end{codeexample}
\end{command}
-Note the following effect: If you setup a certain opacity for stroking
+Note the following effect: If you set up a certain opacity for stroking
or filling and you stroke or fill the same area twice, the effect
accumulates:
@@ -72,6 +72,29 @@ Often, this is exactly what you intend, but not always. You can use
transparency groups, see the end of this section, to change this.
+\subsection{Specifying a Blend Mode}
+
+To set the blend mode, use the following command:
+
+\begin{command}{\pgfsetblendmode\marg{mode}}
+ Sets the blend mode to one of the values described in
+ Section~\ref{section-blend-modes}. As described there, blend modes
+ are an advanced feature of \textsc{pdf} and not always rendered
+ correctly.
+
+
+\begin{codeexample}[]
+\tikz [transparency group] {
+ \pgfsetblendmode{screen}
+
+ \fill[red!90!black] ( 90:.6) circle (1);
+ \fill[green!80!black] (210:.6) circle (1);
+ \fill[blue!90!black] (330:.6) circle (1);
+}
+\end{codeexample}
+\end{command}
+
+
\subsection{Specifying a Fading}
The method used by \pgfname\ for specifying fadings is quite
@@ -91,9 +114,9 @@ transparent.
\begin{command}{\pgfdeclarefading\marg{name}\marg{contents}}
- This command declare a fading named \meta{name} for later use. The
+ This command declares a fading named \meta{name} for later use. The
``picture'' on which the fading is based is given by the
- \meta{contents}. This \meta{contents} is normally typeset in a \TeX\
+ \meta{contents}. The \meta{contents} are normally typeset in a \TeX\
box. The resulting box is then used as the ``picture.'' In
particular, inside the \meta{contents} you must explicitly open a
|{pgfpicture}| environment if you wish to use \pgfname\ commands.
@@ -168,7 +191,7 @@ transparent.
\end{command}
After having declared a fading, we can use it. As for shadings, there
-are two different commands for using fadings:
+are different commands for using fadings:
\begin{command}{\pgfsetfading\marg{name}\marg{transformations}}
This command sets the graphic state parameter ``fading'' to a
@@ -177,7 +200,7 @@ are two different commands for using fadings:
current scope or until a different transparency setting is chosen.
When the fading is installed, it will be centered on the origin with
- its natural size. Anything outside the fading pictures's original
+ its natural size. Anything outside the fading picture's original
bounding box will be transparent and, thus, the fading effectively
clips against this bounding box.
@@ -212,7 +235,7 @@ are two different commands for using fadings:
\begin{command}{\pgfsetfadingforcurrentpath\marg{name}\marg{transformations}}
This command works like |\pgfsetfading|, but the fading is scaled
- are transformed according to the following rules:
+ and transformed according to the following rules:
\begin{enumerate}
\item
If the current path is empty, the command has the same effect as
@@ -257,15 +280,33 @@ are two different commands for using fadings:
\end{command}
+\begin{command}{\pgfsetfadingforcurrentpathstroked\marg{name}\marg{transformations}}
+ This command works line |\pgfsetfadingforcurrentpath|, only the
+ current path is enlarged by the line width in both $x$- and
+ $y$-direction. This is exactly the enlargement necessary to
+ compensate for the fact that if the 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{tikzpicture}
+ \pgfsetlinewidth{2mm}
+ \pgfpathmoveto{\pgfpointorigin}
+ \pgfpathlineto{\pgfpoint{2cm}{0cm}}
+ \pgfsetfadingforcurrentpathstroked{fading}{}
+ \pgfusepath{stroke}
+\end{tikzpicture}
+\end{codeexample}
+\end{command}
+
\subsection{Transparency Groups}
Transparency groups are declared using the following commands.
-\begin{environment}{{pgftransparencygroup}}
+\begin{environment}{{pgftransparencygroup}\opt{\oarg{options}}}
This environment should only be used inside a |{pgfpicture}|. It has
the following effect:
\begin{enumerate}
- \item The \meta{environment contents} is stroked/filled
+ \item The \meta{environment contents} are stroked/filled
``ignoring any outside transparency.'' This means, all previous
transparency settings are ignored (you can still set transparency
inside the group, but never mind). This means that if in the
@@ -279,7 +320,20 @@ Transparency groups are declared using the following commands.
color will be blended with whatever is ``behind'' the group on the
page.
\end{enumerate}
-
+
+ The optional \meta{options} are keys that configure the transparency
+ group further. Two keys are currently defined:
+ \begin{itemize}
+ \item \declare{|knockout|\opt{|=|\meta{true or false}}} Configures
+ whether the group is a knockout group (if no argument is given,
+ |true| is assumed; initially the key is always false, even when
+ the command is used in a nested manner.) See
+ Section~\ref{section-transparency-groups} for details on knockout groups.
+ \item \declare{|isolated|\opt{|=|\meta{true or false}}} Similar, but
+ configures whether the group is an isolated group. Also see
+ Section~\ref{section-transparency-groups} for details on isolated groups.
+ \end{itemize}
+
Note that, depending on the driver, \pgfname\ may have to guess the
size of the contents of the transparency group (because such a group
is put in an XForm in \textsc{pdf} and a bounding box must be