diff options
author | Karl Berry <karl@freefriends.org> | 2014-02-27 00:01:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-02-27 00:01:50 +0000 |
commit | 90ae413a94da014dbf7a6a8ab584f7c668483a5a (patch) | |
tree | 4e0528a2b2fb2004988e7fc804ea2f1354f1f5d5 /Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-shadings.tex | |
parent | 800cc56380d1edfe567a6a66bef13e8950eb2b0c (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-shadings.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-shadings.tex | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-shadings.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-shadings.tex index d38f6bf3759..16d4dd04d99 100644 --- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-shadings.tex +++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-shadings.tex @@ -27,7 +27,7 @@ complicated shadings. Horizontal shadings could be created by rotating a vertical shading by 90 degrees, but explicit commands for creating both horizontal and vertical shadings are included for convenience. -Once you have declared a shading, you can insert it into text using +Once you have declared a shading, you can insert it into the text using the command |\pgfuseshading|. This command cannot be used directly in a |{pgfpicture}|, you have to put a |\pgftext| around it. The second command for using shadings, |\pgfshadepath|, on the other hand, can @@ -38,8 +38,8 @@ A horizontal shading is a horizontal bar of a certain height whose color changes smoothly. You must at least specify the colors at the left and at the right end of the bar, but you can also add color specifications for points in between. For example, suppose you -which to create a bar that is red at the left end, green in the -middle, and blue at the end. Suppose you would like the bar to be 4cm +wish to create a bar that is red at the left end, green in the +middle, and blue at the end, and you would like the bar to be 4cm long. This could be specified as follows: \begin{codeexample}[code only] rgb(0cm)=(1,0,0); rgb(2cm)=(0,1,0); rgb(4cm)=(0,0,1) @@ -63,7 +63,7 @@ in increasing order. \begin{command}{\pgfdeclarehorizontalshading\oarg{color list}\marg{shading name}\marg{shading height}\marg{color specification}} Declares a horizontal shading named \meta{shading name} of the specified - \meta{height} with the specified colors. The length of the bar is + \meta{height} with the specified colors. The width of the bar is deduced automatically from the maximum dimension in the specification. \begin{codeexample}[] @@ -127,7 +127,7 @@ in increasing order. \begin{command}{\pgfdeclareradialshading\oarg{color list}\marg{shading name}\marg{center point}\marg{color specification}} - Declares an radial shading. A radial shading is a circle whose inner + Declares a radial shading. A radial shading is a circle whose inner color changes as specified by the color specification. Assuming that the center of the shading is at the origin, the color of the center will be the color specified for 0cm and the color of the border of @@ -161,9 +161,9 @@ in increasing order. This command creates a \emph{functional shading}. For such a shading, the color of each point is calculated by calling a function - that gets the coordinates of the point as input and yields the + that takes the coordinates of the point as input and yields the color as an output. Note that the function is evaluated by the - \emph{renderer}, not by \pgfname\ or \TeX or someone else at + \emph{renderer}, not by \pgfname\ or \TeX\ or someone else at compile-time. This means that the evaluation of this function has to be done \emph{extremely quickly} and the function should be \emph{very simple}. For this reason, only a very restricted set of @@ -200,7 +200,7 @@ in increasing order. empty (or should be treated as if it were empty). The function should then replace these two values by three values, representing the red, green, and blue color of the point. The numbers should be - real values, not integers since Apple's PDF renderer is broken in + real values, not integers since, Apple's PDF renderer is broken in this regard (use cvr at the end if necessary). Conceptually, the function will be evaluated once for each point of @@ -212,7 +212,7 @@ in increasing order. Because of the rather difficult PostScript syntax, use this macro only \emph{if you know what you are doing} (or if you are - advantageous, of course). + adventurous, of course). As for other shadings, the optional \meta{color list} is used to determine whether a shading needs to be recalculated when a color @@ -232,7 +232,7 @@ in increasing order. 40 sub dup mul 0.5 mul add sqrt % exponential decay dup mul neg 1.0005 exch exp 1.0 exch sub - % Compute distance form (70bp,70bp) from stored coordinate, scaled + % Compute distance from (70bp,70bp) from stored coordinate, scaled 3 1 roll 70 sub dup mul .5 mul exch 70 sub dup mul add sqrt @@ -246,7 +246,7 @@ in increasing order. Inside the PostScript function \meta{type 4 function} you cannot use colors directly. Rather, you must push the color components on the - stack. For this, it is useful to call |\pgfshadecolorrgb| in the + stack. For this, it is useful to call |\pgfshadecolortorgb| in the \meta{init code}: \begin{command}{\pgfshadecolortorgb\marg{color name}\marg{macro}} @@ -358,7 +358,7 @@ be used in the \meta{type 4 function} argument. This command must be used inside a |{pgfpicture}| environment. The effect is a bit complex, so let us go over it step by step. - First, \pgfname\ will setup a local scope. + First, \pgfname\ will set up a local scope. Second, it uses the current path to clip everything inside this scope. However, the current path is once more available after the @@ -374,7 +374,7 @@ be used in the \meta{type 4 function} argument. Inside the scope, the low-level transformation matrix is modified. The center of the shading is translated (moved) such that it lies on the center of the bounding box of the path. The low-level coordinate - system is also scaled such that the shading ``covers'' the shading (the + system is also scaled such that the shading ``covers'' the path (the details are a bit more complex, see below). Then, the coordinate system is rotated by \meta{angle}. Finally, if the macro |\pgfsetadditionalshadetransform| has been used, an additional @@ -385,7 +385,7 @@ be used in the \meta{type 4 function} argument. shading seems to ``fill'' the path. If both the path and the shadings were always rectangles and if - rotation were never involved, it would be easy to scale shadings + rotations were never involved, it would be easy to scale shadings such they always cover the path. However, when a vertical shading is rotated, it must obviously be ``magnified'' so that it still covers the path. Things get worse when the path is not a @@ -512,7 +512,7 @@ be used in the \meta{type 4 function} argument. \end{tikzpicture} \end{codeexample} - Note that rainbow shadings are \emph{way} to colorful in almost all + Note that rainbow shadings are \emph{way} too colorful in almost all applications. \end{command} |