summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pst-grad
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-07-28 00:35:14 +0000
committerKarl Berry <karl@freefriends.org>2007-07-28 00:35:14 +0000
commit11a36dc12d07d6957138e35f89401eee4bd9b4ba (patch)
tree20de6f425223f7722667fe1d83f5150fd8e2a1b5 /Master/texmf-dist/tex/generic/pst-grad
parent57814cd1a4f5be3ec8cb4211a58e34537f6b573c (diff)
pst-grad 1.06 (11jul07)
git-svn-id: svn://tug.org/texlive/trunk@4677 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pst-grad')
-rw-r--r--Master/texmf-dist/tex/generic/pst-grad/pst-grad.tex35
1 files changed, 25 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-grad/pst-grad.tex b/Master/texmf-dist/tex/generic/pst-grad/pst-grad.tex
index 79eb3732ae5..bbdc4ee89b0 100644
--- a/Master/texmf-dist/tex/generic/pst-grad/pst-grad.tex
+++ b/Master/texmf-dist/tex/generic/pst-grad/pst-grad.tex
@@ -33,6 +33,7 @@
%% GradientScale=float : scaling factor of the circled gradient
%% (version 1.04)
%% GradientHSB : Use HSB color model
+%% cmyk : Use CMYK color model
%%
\csname GradientLoaded\endcsname
\let\GradientLoaded\endinput
@@ -41,9 +42,9 @@
\fi
\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi
-\def\fileversion{1.05}
-\def\filedate{2006/11/04}
-\message{`pst-plot' v\fileversion, \filedate\space (tvz,dg,hv)}
+\def\fileversion{1.06}
+\def\filedate{2006/11/27}
+\message{`pst-grad' v\fileversion, \filedate\space (tvz,dg,hv)}
\edef\TheAtCode{\the\catcode`\@}
\catcode`\@=11
@@ -51,8 +52,17 @@
\pstheader{pst-grad.pro}
-\newrgbcolor{gradbegin}{0 .1 .95}
-\newrgbcolor{gradend}{0 1 1}
+\define@boolkey[psset]{pst-grad}[Pst@]{cmyk}[true]{%
+ \ifPst@cmyk
+ \newcmykcolor{gradbegin}{0 .1 .95 0.1}
+ \newcmykcolor{gradend}{0 0.8 0.6 0.5}
+ \else
+ \newrgbcolor{gradbegin}{0 .1 .95}
+ \newrgbcolor{gradend}{0 1 1}
+ \fi%
+}
+\psset[pst-grad]{cmyk=false}
+%
\define@key[psset]{pst-grad}{gradbegin}{\pst@getcolor{#1}\psgradbegin}
\define@key[psset]{pst-grad}{gradend}{\pst@getcolor{#1}\psgradend}
\define@key[psset]{pst-grad}{gradlines}{%
@@ -68,13 +78,15 @@
% Denis Girou - April 1998 ------- patch 2 (hv)
% To define the gradient as linear or as circle
+%==================================================================
\define@boolkey[psset]{pst-grad}[Pst@]{GradientCircle}[true]{}
% Position of the center of the gradient
\define@key[psset]{pst-grad}{GradientPos}{\psset@@GradientPos#1}%
- \def\psset@@GradientPos(#1){\edef\ps@GradientPos{#1}}
+\def\psset@@GradientPos(#1){\edef\ps@GradientPos{#1}}
% Scale factor
\define@key[psset]{pst-grad}{GradientScale}{\def\ps@GradientScale{#1}}
-\psset[pst-grad]{GradientScale=1,GradientPos={(0,0)},GradientCircle=false}
+\psset[pst-grad]{GradientCircle=false,GradientScale=1,GradientPos={(0,0)}}
+%=====================================================================
%
\define@boolkey[psset]{pst-grad}[Pst@]{gradientHSB}[true]{}
\psset[pst-grad]{gradientHSB=false}
@@ -99,14 +111,17 @@
% hv end
\addto@pscode{%
gsave
- \ifPst@GradientCircle true \else false \fi
+ \ifPst@GradientCircle\space true \else false \fi
\ps@GradientScale\space
\pst@tempa\space
- gsave \pst@usecolor\psgradbegin currentrgbcolor grestore
- gsave \pst@usecolor\psgradend currentrgbcolor grestore
+ gsave \pst@usecolor\psgradbegin
+ \ifPst@cmyk currentcmykcolor \else currentrgbcolor \fi grestore
+ gsave \pst@usecolor\psgradend
+ \ifPst@cmyk currentcmykcolor \else currentrgbcolor \fi grestore
\psgradlines
\psgradmidpoint
\psk@gradangle
+ \ifPst@cmyk true \else false \fi
tx@GradientDict begin GradientFill end grestore%
}%
\fi%