\usepackage{showexpl}% not a real PSTricks package
\usepackage{babel}
\usepackage{makeidx}
\makeindex
\usepackage[dvips,colorlinks,linktocpage]{hyperref} % PDF-support
%
\renewcommand{\ttdefault}{ul9}% Luxi Mono
\lstset{keywordstyle=\small\ttfamily\bfseries,preset=\raggedright}
\lstset{language=PSTricks,moredelim=**[is][\bf\color{blue}]{�}{�}}%
%
\begin{document}
%
\title{\texttt{pst-grad}:Gradients \\[10pt]\footnotesize v. \GRADfileversion\ -- \GRADfiledate}
\author{Herbert Vo�\thanks{Thanks to Lars Kotthoff and Angelo Rossi for translating this documentation!}
}
\maketitle
\begin{abstract}
\PIndex{pst-grad}\tIndex{pst-grad}\verb+pst-grad+
is also one of the older and smaller
packages. It provides only one fill style. A
gradient could be created with the macros known from \PST, too, the use of
\verb+pst-grad+ offers advantages though, since one does not need to take care
of the calculation of the intermediate colour values.
This version of \verb+pst-grad+ integrates the function of the
\verb+pst-ghsb+ package, which supports the HSB color model.
\end{abstract}
\tableofcontents
\clearpage
\section{Introduction}
All parameters are only available when \textbf{gradient} is used as
fill style.
There are further packages which support such fill styles, especially for
circular gradients (\verb+pst-slpe+\PIndex{pst-slpe}).
% ---------------------------------------------------------------------------------------
\section{Parameters}\label{sec:pstgrad:parameter}
% ---------------------------------------------------------------------------------------
Table~\ref{tab:pst-grad:parameter} shows a compilation of the special parameters
valid for \verb+pst-grad+.
% ---------------------------------------------------------------------------------------
\subsection{\texttt{gradbegin}}\label{subsec:pstgrad:gradbegin}
% ---------------------------------------------------------------------------------------
\tIndex{gradbegin}\verb+gradbegin+ denotes the parameter as well as the starting
colour, which is a little bit confusing here.
\begin{verbatim}
\newrgbcolor{gradbegin}{0 .1 .95} % default
\end{verbatim}
Consequently this starting colour can be changed by redefining the colour or by
an assignment through the parameter.
\begin{verbatim}
\newrgbcolor{gradbegin}{0 0 1}
\definecolor{rgb}{gradbegin}{0 0 1} % requires color/xcolor package
\psset{gradbegin=blue}
\end{verbatim}
\medskip
%\begin{shaded}
\begin{itemize}
\item \verb+gradbegin+ should be defined as \verb+RGB+ colour\tIndex{RGB},
since a faultless function for \verb+CMYK+ or gray scales is not
warranted in every case.
\item Con\TeX{}t users change the colour with\\
\verb+\definecolor{rgb}{gradbegin}{r=0,g=0,b=1}+
\end{itemize}
%\end{shaded}
% ---------------------------------------------------------------------------------------
\subsection{\texttt{gradend}}\label{subsec:pstgrad:gradend}
% ---------------------------------------------------------------------------------------
\tIndex{gradend}\verb+gradend+ is \textbf{not} the counterpart to
\verb+gradbegin+, for it is the colour which is reached at the relative point
\verb+gridmidpoint+. In every case it is ambiguous as \verb+gradbegin+ again.
\begin{verbatim}
\newrgbcolor{gradend}{0 1 1} % default
\end{verbatim}
Changes can be made differently again.
\begin{verbatim}
\newrgbcolor{gradend}{1 0 0}
\definecolor{rgb}{gradend}{1 0 0} % requires color/xcolor package
\psset{gradend=red}
\end{verbatim}
\medskip
%\begin{shaded}
\begin{itemize}
\item \verb+gradend+ should be defined as \verb+RGB+ colour\tIndex{RGB},
since a faultless function for \verb+CMYK+ or gray scales is not
warranted in every case.
\item Con\TeX{}t users change the colour with\\
\verb+\definecolor{rgb}{gradend}{r=1,g=1,b=0}+
\end{itemize}
%\end{shaded}
% ---------------------------------------------------------------------------------------
\subsection{\texttt{gradlines}}\label{subsec:pstgrad:gradlines}
% ---------------------------------------------------------------------------------------
\tIndex{gradlines}A gradient is nothing but a string of coloured lines. The
width of those depends only on the resolution of the monitor resp. the printer
in the end. But since this is very user-specific, \verb+pst-grad+ allows any
number of lines, which can be changed through \verb+gradlines+.
% ---------------------------------------------------------------------------------------
\subsection{\texttt{gradmidpoint}}\label{subsec:pstgrad:gradmidpoint}
% ---------------------------------------------------------------------------------------
\tIndex{gradmidpoint}Denotes the relative point where the colour \verb+gradend+
is reached. Then it is proceeded in reverse order.
% ---------------------------------------------------------------------------------------
\subsection{\texttt{gradangle}}\label{subsec:pstgrad:gradangle}
% ---------------------------------------------------------------------------------------
\tIndex{gradangle}\verb+gradangle+ determines the gradient angle of the straight
line.
% ---------------------------------------------------------------------------------------
\subsection{\texttt{GradientCircle}, \texttt{GradientScale} and \texttt{GradientPos} }\label{subsec:pstgrad:GradientCircle}
% ---------------------------------------------------------------------------------------
\tIndex{GradientCircle}\tIndex{GradientScale}\tIndex{GradientPos}With the option
\verb+GradientCircle+ circular gradients can be created. The radius can be
influenced through \verb+GradientScale+ and the centre with \verb+GradientPos+.
The specification of the coordinates refers to the based coordinate system,
which is given by the \verb+pspicture+ environment as a rule.