diff options
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-slpe/Changes | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-slpe/README | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-slpe/pst-slpe.pdf | bin | 224054 -> 285064 bytes | |||
-rw-r--r-- | Master/texmf-dist/dvips/pst-slpe/pst-slpe.pro | 40 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/pst-slpe/pst-slpe.dtx | 139 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-slpe/pst-slpe.tex | 18 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pst-slpe/pst-slpe.sty | 6 |
7 files changed, 195 insertions, 19 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-slpe/Changes b/Master/texmf-dist/doc/generic/pst-slpe/Changes index 6d053d61628..fe862ade686 100644 --- a/Master/texmf-dist/doc/generic/pst-slpe/Changes +++ b/Master/texmf-dist/doc/generic/pst-slpe/Changes @@ -1,7 +1,12 @@ pst-slpe.tex -------- +1.3 2008/08/20 added fading style (hv) 1.2 2008/06/19 \textbackslash psBall (hv) 1.1 2006/06/19 using the extended pst-xkey instead of the old pst-key package; creating a dtx file (hv) 1.0 2005/03/05 More compatible to the other PStricks packages. (RN) + + +pst-slpe.pro -------- +1.3 2008/08/20 added fading style (hv) diff --git a/Master/texmf-dist/doc/generic/pst-slpe/README b/Master/texmf-dist/doc/generic/pst-slpe/README index 466d90a75c7..559f591f121 100644 --- a/Master/texmf-dist/doc/generic/pst-slpe/README +++ b/Master/texmf-dist/doc/generic/pst-slpe/README @@ -1,11 +1,11 @@ ----------------------------------------------------- | pst-slpe: PSTricks package for improved gradients | | | -| Version 1.2 (June 19, 2008) | +| Version 1.3 (September 19, 2008) | | Martin Giese <giese@ira.uka.de> | +| Herbert Voss <voss@PSTricks.de> | ----------------------------------------------------- - * Run "tex" on pst-slpe.ins and copy pst-slpe.tex and pst-slpe.sty in one of your TeX input directories @@ -16,4 +16,4 @@ directories -- Martin Giese (updated September 15, 1998) -Herbert Voss (using xkeyval -- 2008-06-19)
\ No newline at end of file +Herbert Voss ( 2008-08-19)
\ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/pst-slpe/pst-slpe.pdf b/Master/texmf-dist/doc/generic/pst-slpe/pst-slpe.pdf Binary files differindex a38592540b4..da15c1acdbe 100644 --- a/Master/texmf-dist/doc/generic/pst-slpe/pst-slpe.pdf +++ b/Master/texmf-dist/doc/generic/pst-slpe/pst-slpe.pdf diff --git a/Master/texmf-dist/dvips/pst-slpe/pst-slpe.pro b/Master/texmf-dist/dvips/pst-slpe/pst-slpe.pro index d64911ad77a..ce4ab2c2f38 100644 --- a/Master/texmf-dist/dvips/pst-slpe/pst-slpe.pro +++ b/Master/texmf-dist/dvips/pst-slpe/pst-slpe.pro @@ -25,6 +25,8 @@ %% in directory macros/latex/base/lppl.txt. %% /tx@PstSlopeDict 60 dict def tx@PstSlopeDict begin +/Opacity 1 def % preset, no transparency +/Opacity++ { Opacity dOpacity add /Opacity ED } def /max {2 copy lt {exch} if pop} bind def /Iterate { 1 sub /NumSegs ED @@ -34,7 +36,10 @@ /ThisS ED /ThisH ED /ThisPt ED - gsave fill grestore + Opacity .setopacityalpha + gsave + fill + grestore NumSegs { dup mul 3 1 roll dup mul 3 1 roll dup mul 3 1 roll setrgbcolor currenthsbcolor @@ -86,9 +91,16 @@ } if } def /SlopesFill { + /Fading ED % do we have fading? + Fading { + /FadingEnd ED % the last opacity value + dup /FadingStart ED % the first opacity value + /Opacity ED % the opacity start value + } if gsave 180 add rotate /NumSteps ED + Fading { /dOpacity FadingEnd FadingStart sub NumSteps div def } if clip pathbbox /h ED /w ED @@ -97,6 +109,10 @@ w sub neg /w ED /XInc w NumSteps div def /DrawStep { + Fading { % do we have a fading? + Opacity .setopacityalpha % set opacity value + Opacity++ % increase opacity + } if 0 0 XInc h rectfill XInc 0 translate } bind def @@ -104,11 +120,18 @@ grestore } def /CcSlopesFill { + /Fading ED % do we have fading? + Fading { + /FadingEnd ED % the last opacity value + dup /FadingStart ED % the first opacity value + /Opacity ED % the opacity start value + } if gsave /Radius ED /CenterY ED /CenterX ED /NumSteps ED + Fading { /dOpacity FadingEnd FadingStart sub NumSteps div def } if clip pathbbox /h ED /w ED @@ -120,6 +143,10 @@ /RadPerStep Radius NumSteps div neg def /Rad Radius def /DrawStep { + Fading { % do we have a fading? + Opacity .setopacityalpha % set opacity value + Opacity++ % increase opacity + } if 0 0 Rad 0 360 arc closepath fill /Rad Rad RadPerStep add def @@ -128,12 +155,19 @@ grestore } def /RadSlopesFill { + /Fading ED % do we have fading? + Fading { + /FadingEnd ED % the last opacity value + dup /FadingStart ED % the first opacity value + /Opacity ED % the opacity start value + } if gsave rotate /Radius ED /CenterY ED /CenterX ED /NumSteps ED + Fading { /dOpacity FadingEnd FadingStart sub NumSteps div def } if clip pathbbox /h ED /w ED @@ -145,6 +179,10 @@ /AngleIncrement 360 NumSteps div neg def /dY AngleIncrement sin AngleIncrement cos div Radius mul def /DrawStep { + Fading { % do we have a fading? + Opacity .setopacityalpha % set opacity value + Opacity++ % increase opacity + } if 0 0 moveto Radius 0 rlineto 0 dY rlineto diff --git a/Master/texmf-dist/source/generic/pst-slpe/pst-slpe.dtx b/Master/texmf-dist/source/generic/pst-slpe/pst-slpe.dtx index 50082497da5..a0717360da9 100644 --- a/Master/texmf-dist/source/generic/pst-slpe/pst-slpe.dtx +++ b/Master/texmf-dist/source/generic/pst-slpe/pst-slpe.dtx @@ -2,13 +2,14 @@ %\iffalse % % Copyright 1998-2008 Martin Giese, mgiese@risc.uni-linz.ac.at -% Herbert Voss (using xkeyval, \psBall) +% Herbert Voss (using xkeyval,\psBall,fading) % %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives %% in directory macros/latex/base/lppl.txt. %% %\fi +% \changes{v1.3}{2008/09/20}{ fading option (hv)} % \changes{v1.2}{2008/06/19}{ \textbackslash psBall (hv)} % \changes{v1.1}{2006/06/19}{% % using the extended pst-xkey instead of the old pst-key package; @@ -64,14 +65,14 @@ % %\iffalse %<*!prolog> -\def\pstslpefileversion{1.2} -\def\pstslpefiledate{2008/06/19} +\def\pstslpefileversion{1.3} +\def\pstslpefiledate{2008/09/20} %</!prolog> %\fi % % \title{\textsf{pst-slpe} package \\ version \pstslpefileversion} -% \author{Martin Giese\footnote{email:\texttt{giese@ira.uka.de} Version 1.2 prepared -% by Herbert Vo\ss\ \texttt{voss@pstricks.de}}} +% \author{Martin Giese\footnote{\texttt{giese@ira.uka.de}} and +% Herbert Vo\ss\footnote{\texttt{voss@pstricks.de}}} % \date{\pstslpefiledate} % \maketitle % @@ -199,7 +200,9 @@ % the general $\ldots$|slopes|-styles.\footnote{By the way, I use slope % as a synonym for gradient. It sounds less pretentious and avoids % name clashes.} The |cc|$\ldots$ styles paint concentric patterns, -% and the |rad|$\ldots$ styles do radial ones. Here is a little +% and the |rad|$\ldots$ styles do radial ones. +% +% Here is a little % overview of what they look like: % \newcommand{\st}{$\vcenter to30pt{}$} % \begin{quote}\LARGE @@ -358,6 +361,52 @@ % The default value for |sloperadius| is 0, which invokes the default % behaviour of automatically calculating the radius. % +% \DescribeMacro{fading} +% \DescribeMacro{startfading} +% \DescribeMacro{endfading} +% The optional boolean keyword |fading| allows a transparency effect of +% the filled area, starting with the opacity value |startfading| and +% ending with the value of |endfading|. Both values must be of the +% intervall [0\ldots1], with 0 for total opacity and 1 for no +% opacity. The values are preset by 0 and 1. +% +% Here is a little +% overview of what they look like: +% \begin{quote}\LARGE\color{white} +% \begin{tabular}{cc} +% \psframe*(-0.3,-0.25)(3,20pt)\psframebox[fading,fillstyle=slope]{\st| slope |} &\qquad +% \psframe*(-0.3,-0.25)(3,20pt)\psframebox[fading,fillstyle=slopes]{\st| slopes |} \\[2ex] +% \psframe*(-0.3,-0.25)(3,20pt)\psframebox[fading,fillstyle=ccslope]{\st|ccslope |} &\qquad +% \psframe*(-0.3,-0.25)(3,20pt)\psframebox[fading,fillstyle=ccslopes]{\st|ccslopes|} \\[2ex] +% \psframe*(-0.3,-0.25)(3,20pt)\psframebox[fading,fillstyle=radslope]{\st|radslope|} &\qquad +% \psframe*(-0.3,-0.25)(3,20pt)\psframebox[fading,fillstyle=radslopes]{\st|radslopes|} \\[2ex] +% \end{tabular} +% \end{quote} +% \color{black} +% +% These examples were produced by saying simply +% \begin{verbatim} +% \psframebox[fading,fillstyle=...]{...} +% \end{verbatim} +% +% \begin{quote}\LARGE\color{white} +% \psset{fading,startfading=0.3,endfading=0.8} +% \begin{tabular}{cc} +% \psframe*(-0.3,-0.25)(3,20pt)\psframebox[fillstyle=slope]{\st| slope |} &\qquad +% \psframe*(-0.3,-0.25)(3,20pt)\psframebox[fillstyle=slopes]{\st| slopes |} \\[2ex] +% \psframe*(-0.3,-0.25)(3,20pt)\psframebox[fillstyle=ccslope]{\st|ccslope |} &\qquad +% \psframe*(-0.3,-0.25)(3,20pt)\psframebox[fillstyle=ccslopes]{\st|ccslopes|} \\[2ex] +% \psframe*(-0.3,-0.25)(3,20pt)\psframebox[fillstyle=radslope]{\st|radslope|} &\qquad +% \psframe*(-0.3,-0.25)(3,20pt)\psframebox[fillstyle=radslopes]{\st|radslopes|} \\[2ex] +% \end{tabular} +% \end{quote} +% \color{black} +% +% These examples were produced by saying simply +% \begin{verbatim} +% \psframebox[fading,startfading=0.3,endfading=0.8,fillstyle=...]{...} +% \end{verbatim} +% % \StopEventually{} % %\section{The Code} @@ -396,7 +445,7 @@ \input{pst-slpe.tex} \ProvidesFile{pst-slpe.tex} [\pstslpefiledate\space v\pstslpefileversion\space - `pst-slpe' (Martin Giese)] + `pst-slpe' (mg,hv)] \IfFileExists{pst-slpe.pro}{% \ProvidesFile{pst-slpe.pro} [2008/06/19 v. 0.01, PostScript prologue file (hv)] @@ -483,6 +532,28 @@ \psset[pst-slpe]{sloperadius=0}% --> hv % \end{macrocode} % \end{macro} +% \begin{macro}{fading} +% The default value for |fading| is false, which is no transparency effect at all. +% With |fading=true| the package takes the values |startfading| and |endfading| +% into account for the opacity effect of the filled area. +% \end{macro} +% \begin{macrocode} +\define@boolkey[psset]{pst-slpe}[PST@]{fading}[true]{}% --> hv +\psset[pst-slpe]{fading=false}% --> hv +% \end{macrocode} +% \begin{macro}{startfading} +% The relativ number for the starting value (0\ldots1), preset by 0. +% \end{macro} +% \begin{macrocode} +\define@key[psset]{pst-slpe}{startfading}{\pst@checknum{#1}\psk@startfading }% --> hv +% \end{macrocode} +% \begin{macro}{endfading} +% The relativ number for the end value (0\ldots1), preset by 1. +% \end{macro} +% \begin{macrocode} +\define@key[psset]{pst-slpe}{endfading}{\pst@checknum{#1}\psk@endfading }% --> hv +\psset[pst-slpe]{startfading=0,endfading=1}% --> hv +% \end{macrocode} % % \subsubsection{Fill style macros} % @@ -506,6 +577,7 @@ \psx@slopecolors\space \psslopesteps \psx@slopeangle + \ifPST@fading \psk@startfading \psk@endfading true \else false \fi tx@PstSlopeDict begin SlopesFill end}} % \end{macrocode} % \end{macro} @@ -527,7 +599,9 @@ 1 \pst@usecolor\psslopeend currentrgbcolor 2 grestore - \psslopesteps \psx@slopeangle tx@PstSlopeDict begin SlopesFill end}} + \psslopesteps \psx@slopeangle + \ifPST@fading \psk@startfading \psk@endfading true \else false \fi + tx@PstSlopeDict begin SlopesFill end}} % \end{macrocode} % \end{macro} % @@ -542,6 +616,7 @@ \addto@pscode{% \psx@slopecolors\space \psslopesteps \psx@slopecenter\space \psx@sloperadius\space + \ifPST@fading \psk@startfading \psk@endfading true \else false \fi tx@PstSlopeDict begin CcSlopesFill end}} \def\psfs@ccslope{% \addto@pscode{% @@ -549,11 +624,13 @@ 1 \pst@usecolor\psslopeend currentrgbcolor 2 grestore \psslopesteps \psx@slopecenter\space \psx@sloperadius\space + \ifPST@fading \psk@startfading \psk@endfading true \else false \fi tx@PstSlopeDict begin CcSlopesFill end}} \def\psfs@radslopes{% \addto@pscode{% \psx@slopecolors\space \psslopesteps\psx@slopecenter\space\psx@sloperadius\space\psx@slopeangle + \ifPST@fading \psk@startfading \psk@endfading true \else false \fi tx@PstSlopeDict begin RadSlopesFill end}} % \end{macrocode} % \end{macro} @@ -573,6 +650,7 @@ 4 \pst@usecolor\psslopebegin currentrgbcolor 5 grestore \psslopesteps\psx@slopecenter\space\psx@sloperadius\space\psx@slopeangle + \ifPST@fading \psk@startfading \psk@endfading true \else false \fi tx@PstSlopeDict begin RadSlopesFill end}} % \end{macrocode} % \end{macro} @@ -613,6 +691,13 @@ /tx@PstSlopeDict 60 dict def tx@PstSlopeDict begin % \end{macrocode} % +% \begin{macro}{Opacity++} +% This macro increments the Opacity index +% \begin{macrocode} +/Opacity 1 def % preset, no transparency +/Opacity++ { Opacity dOpacity add /Opacity ED } def +% \end{macrocode} +% \end{macro} % \begin{macro}{max} % $x1 \quad x2 \quad \mathtt{max}\quad max$\\ % |max| is a utility function that calculates the maximum @@ -656,7 +741,10 @@ % \end{macrocode} % To avoid gaps, we fill the whole path in that first colour. % \begin{macrocode} - gsave fill grestore + Opacity .setopacityalpha + gsave + fill + grestore % \end{macrocode} % The body of the following outer loop is executed % once for each segment. @@ -790,9 +878,16 @@ % translate the user system by |XInc|. % \begin{macrocode} /SlopesFill { + /Fading ED % do we have fading? + Fading { + /FadingEnd ED % the last opacity value + dup /FadingStart ED % the first opacity value + /Opacity ED % the opacity start value + } if gsave 180 add rotate /NumSteps ED + Fading { /dOpacity FadingEnd FadingStart sub NumSteps div def } if clip pathbbox /h ED /w ED @@ -801,6 +896,10 @@ w sub neg /w ED /XInc w NumSteps div def /DrawStep { + Fading { % do we have a fading? + Opacity .setopacityalpha % set opacity value + Opacity++ % increase opacity + } if 0 0 XInc h rectfill XInc 0 translate } bind def @@ -834,11 +933,18 @@ % non-overlapping, `donut-shapes' would be slower. % \begin{macrocode} /CcSlopesFill { + /Fading ED % do we have fading? + Fading { + /FadingEnd ED % the last opacity value + dup /FadingStart ED % the first opacity value + /Opacity ED % the opacity start value + } if gsave /Radius ED /CenterY ED /CenterX ED /NumSteps ED + Fading { /dOpacity FadingEnd FadingStart sub NumSteps div def } if clip pathbbox /h ED /w ED @@ -850,6 +956,10 @@ /RadPerStep Radius NumSteps div neg def /Rad Radius def /DrawStep { + Fading { % do we have a fading? + Opacity .setopacityalpha % set opacity value + Opacity++ % increase opacity + } if 0 0 Rad 0 360 arc closepath fill /Rad Rad RadPerStep add def @@ -876,12 +986,19 @@ % as $|dY|:=|Radius|\times\tan(|AngleIncrement|)$. % \begin{macrocode} /RadSlopesFill { + /Fading ED % do we have fading? + Fading { + /FadingEnd ED % the last opacity value + dup /FadingStart ED % the first opacity value + /Opacity ED % the opacity start value + } if gsave rotate /Radius ED /CenterY ED /CenterX ED /NumSteps ED + Fading { /dOpacity FadingEnd FadingStart sub NumSteps div def } if clip pathbbox /h ED /w ED @@ -893,6 +1010,10 @@ /AngleIncrement 360 NumSteps div neg def /dY AngleIncrement sin AngleIncrement cos div Radius mul def /DrawStep { + Fading { % do we have a fading? + Opacity .setopacityalpha % set opacity value + Opacity++ % increase opacity + } if 0 0 moveto Radius 0 rlineto 0 dY rlineto diff --git a/Master/texmf-dist/tex/generic/pst-slpe/pst-slpe.tex b/Master/texmf-dist/tex/generic/pst-slpe/pst-slpe.tex index bb7a913e0e5..870cf8480cb 100644 --- a/Master/texmf-dist/tex/generic/pst-slpe/pst-slpe.tex +++ b/Master/texmf-dist/tex/generic/pst-slpe/pst-slpe.tex @@ -24,8 +24,8 @@ %% of the LaTeX Project Public License Distributed from CTAN archives %% in directory macros/latex/base/lppl.txt. %% -\def\pstslpefileversion{1.2} -\def\pstslpefiledate{2008/06/19} +\def\pstslpefileversion{1.3} +\def\pstslpefiledate{2008/09/20} \message{ v\pstslpefileversion, \pstslpefiledate} \csname PstSlopeLoaded\endcsname \let\PstSlopeLoaded\endinput @@ -61,11 +61,17 @@ \psset[pst-slpe]{slopecenter={0.5 0.5}}% --> hv \define@key[psset]{pst-slpe}{sloperadius}{\pst@getlength{#1}\psx@sloperadius}% --> hv \psset[pst-slpe]{sloperadius=0}% --> hv +\define@boolkey[psset]{pst-slpe}[PST@]{fading}[true]{}% --> hv +\psset[pst-slpe]{fading=false}% --> hv +\define@key[psset]{pst-slpe}{startfading}{\pst@checknum{#1}\psk@startfading }% --> hv +\define@key[psset]{pst-slpe}{endfading}{\pst@checknum{#1}\psk@endfading }% --> hv +\psset[pst-slpe]{startfading=0,endfading=1}% --> hv \def\psfs@slopes{% \addto@pscode{ \psx@slopecolors\space \psslopesteps \psx@slopeangle + \ifPST@fading \psk@startfading \psk@endfading true \else false \fi tx@PstSlopeDict begin SlopesFill end}} \def\psfs@slope{% \addto@pscode{% @@ -74,11 +80,14 @@ 1 \pst@usecolor\psslopeend currentrgbcolor 2 grestore - \psslopesteps \psx@slopeangle tx@PstSlopeDict begin SlopesFill end}} + \psslopesteps \psx@slopeangle + \ifPST@fading \psk@startfading \psk@endfading true \else false \fi + tx@PstSlopeDict begin SlopesFill end}} \def\psfs@ccslopes{% \addto@pscode{% \psx@slopecolors\space \psslopesteps \psx@slopecenter\space \psx@sloperadius\space + \ifPST@fading \psk@startfading \psk@endfading true \else false \fi tx@PstSlopeDict begin CcSlopesFill end}} \def\psfs@ccslope{% \addto@pscode{% @@ -86,11 +95,13 @@ 1 \pst@usecolor\psslopeend currentrgbcolor 2 grestore \psslopesteps \psx@slopecenter\space \psx@sloperadius\space + \ifPST@fading \psk@startfading \psk@endfading true \else false \fi tx@PstSlopeDict begin CcSlopesFill end}} \def\psfs@radslopes{% \addto@pscode{% \psx@slopecolors\space \psslopesteps\psx@slopecenter\space\psx@sloperadius\space\psx@slopeangle + \ifPST@fading \psk@startfading \psk@endfading true \else false \fi tx@PstSlopeDict begin RadSlopesFill end}} \def\psfs@radslope{% \addto@pscode{% @@ -101,6 +112,7 @@ 4 \pst@usecolor\psslopebegin currentrgbcolor 5 grestore \psslopesteps\psx@slopecenter\space\psx@sloperadius\space\psx@slopeangle + \ifPST@fading \psk@startfading \psk@endfading true \else false \fi tx@PstSlopeDict begin RadSlopesFill end}} \def\psBall{\pst@object{psBall}} \def\psBall@i{\@ifnextchar(\psBall@ii{\psBall@ii(0,0)}} diff --git a/Master/texmf-dist/tex/latex/pst-slpe/pst-slpe.sty b/Master/texmf-dist/tex/latex/pst-slpe/pst-slpe.sty index c5624a0a2ba..a504703834b 100644 --- a/Master/texmf-dist/tex/latex/pst-slpe/pst-slpe.sty +++ b/Master/texmf-dist/tex/latex/pst-slpe/pst-slpe.sty @@ -24,14 +24,14 @@ %% of the LaTeX Project Public License Distributed from CTAN archives %% in directory macros/latex/base/lppl.txt. %% -\def\pstslpefileversion{1.2} -\def\pstslpefiledate{2008/06/19} +\def\pstslpefileversion{1.3} +\def\pstslpefiledate{2008/09/20} \RequirePackage{pstricks} \ProvidesPackage{pst-slpe}[2005/03/05 package wrapper for `pst-slpe.tex'] \input{pst-slpe.tex} \ProvidesFile{pst-slpe.tex} [\pstslpefiledate\space v\pstslpefileversion\space - `pst-slpe' (Martin Giese)] + `pst-slpe' (mg,hv)] \IfFileExists{pst-slpe.pro}{% \ProvidesFile{pst-slpe.pro} [2008/06/19 v. 0.01, PostScript prologue file (hv)] |