diff options
author | Karl Berry <karl@freefriends.org> | 2023-04-02 20:30:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-04-02 20:30:03 +0000 |
commit | 45ce0d6f66aefa48d7484e1d221622a44a034769 (patch) | |
tree | 2a8c74fbe52a8a0b246559e6f7cad37bea9af4a9 | |
parent | 7358471e549def879e872b74f427a1c406324507 (diff) |
pst-hsb (2apr23)
git-svn-id: svn://tug.org/texlive/trunk@66739 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-hsb/Changes | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-hsb/README | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-hsb/pst-hsb-doc.pdf | bin | 200014 -> 225159 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-hsb/pst-hsb-doc.tex | 28 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-hsb/pst-hsb.tex | 94 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pst-hsb/pst-hsb.sty | 2 |
6 files changed, 105 insertions, 31 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-hsb/Changes b/Master/texmf-dist/doc/generic/pst-hsb/Changes index 8a38b6c68af..23c89e48a14 100644 --- a/Master/texmf-dist/doc/generic/pst-hsb/Changes +++ b/Master/texmf-dist/doc/generic/pst-hsb/Changes @@ -1,5 +1,8 @@ ..... pst-hsb.tex -0.02 2017-12-17 - small fixes +0.03 2023-04-02 - added saturation and brightness options + for the macros +0.02 2021-12-16 - small fixes + - updated doc 0.01 2012-01-01 - first version diff --git a/Master/texmf-dist/doc/generic/pst-hsb/README b/Master/texmf-dist/doc/generic/pst-hsb/README index cd130d90cc4..5ad999238d1 100644 --- a/Master/texmf-dist/doc/generic/pst-hsb/README +++ b/Master/texmf-dist/doc/generic/pst-hsb/README @@ -1,3 +1,7 @@ +pst-hsb is a PSTricks related package for plotting lines and +curves with continous colors. Only colors in the hsb modell +are supported. + If you have one of the official TeX distribution installed, then all files are still present or can be installed by using the file manager. Otherwise save the files pst-hsb.sty|tex in a directory, which is part of your @@ -15,5 +19,6 @@ with pdftex, use the sequence latex->dvips->ps2pdf or simply lualatex. %% of the LaTeX Project Public License Distributed from CTAN archives %% in directory macros/latex/base/lppl.txt. +hvoss@tug.org -%% $Id: README 350 2021-12-16 10:20:18Z herbert $ +%% $Id: README 380 2021-12-29 15:23:25Z herbert $ diff --git a/Master/texmf-dist/doc/generic/pst-hsb/pst-hsb-doc.pdf b/Master/texmf-dist/doc/generic/pst-hsb/pst-hsb-doc.pdf Binary files differindex 013dc6d181e..883546606e9 100644 --- a/Master/texmf-dist/doc/generic/pst-hsb/pst-hsb-doc.pdf +++ b/Master/texmf-dist/doc/generic/pst-hsb/pst-hsb-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pst-hsb/pst-hsb-doc.tex b/Master/texmf-dist/doc/generic/pst-hsb/pst-hsb-doc.tex index 08bbc205273..62b5c0073f4 100644 --- a/Master/texmf-dist/doc/generic/pst-hsb/pst-hsb-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-hsb/pst-hsb-doc.tex @@ -1,7 +1,7 @@ -%% $Id: pst-hsb-doc.tex 351 2021-12-16 10:37:40Z herbert $ +%% $Id: pst-hsb-doc.tex 686 2023-04-02 13:03:12Z herbert $ \RequirePackage{pdfmanagement-testphase} \DeclareDocumentMetadata{} -% $Id: pst-hsb-doc.tex 351 2021-12-16 10:37:40Z herbert $ +% $Id: pst-hsb-doc.tex 686 2023-04-02 13:03:12Z herbert $ \documentclass[11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,headings=small, headinclude=false,footinclude=false,twoside]{pst-doc} \usepackage{pst-hsb} @@ -26,7 +26,7 @@ \title{\texttt{pst-hsb}} \subtitle{Curves with continoues color; v.\psthsbFV} -\author{Denis Girout\\Manuel Luque\\Herbert Voß} +\author{Denis Girou\\Manuel Luque\\Herbert Voß} \docauthor{} %\date{\today} \settitle @@ -48,6 +48,20 @@ Thanks to: \newpage +\section{Options} +The macros uses the hsb color model for the continuing setting of the +colors. hsb is Hue, Saturation and Brightness. All three can be defined by the +beginning and end value of the sequence. If the values for beginning and end are the +same then the value will be constant for the whole line and/or curve. The options +are preset to + +\begin{verbatim} + HueBegin=0,HueEnd=1, + SaturationBegin=1, SaturationEnd=1, + BrightnessBegin=1, BrightnessEnd=1, +\end{verbatim} + + \section{Examples} @@ -56,9 +70,11 @@ Thanks to: \begin{pspicture}(-0.5,-0.5)(11,5) % \psgrid(0,-4)(10,4) \psaxes{->}(0,0)(11,5) -\pslineHSB[linewidth=1mm,HueBegin=0,HueEnd=0.5](0,0)(10,1) -\pslineHSB[linewidth=1mm,HueBegin=0.5,HueEnd=0.7](0,1)(10,3) -\pslineHSB[linewidth=1mm,HueBegin=0.8,HueEnd=1](0,2)(10,5) +\pslineHSB[linewidth=1mm,HueBegin=0,HueEnd=0.5](0,0)(10,1)\rput[l](10,1){ 1} +\pslineHSB[linewidth=1mm,HueBegin=0,HueEnd=0.5,SaturationBegin=0](0,0.5)(10,2)\rput[l](10,2){ 2} +\pslineHSB[linewidth=1mm,HueBegin=0.5,HueEnd=0.7](0,1)(10,3)\rput[l](10,3){ 3} +\pslineHSB[linewidth=1mm,HueBegin=0.5,HueEnd=0.7,BrightnessBegin=0](0,1.5)(10,4)\rput[l](10,4){ 4} +\pslineHSB[linewidth=1mm,HueBegin=0.8,HueEnd=1](0,2)(10,5)\rput[l](10,5){ 5} \end{pspicture} \end{LTXexample} diff --git a/Master/texmf-dist/tex/generic/pst-hsb/pst-hsb.tex b/Master/texmf-dist/tex/generic/pst-hsb/pst-hsb.tex index 975e054fc26..fe889cda451 100644 --- a/Master/texmf-dist/tex/generic/pst-hsb/pst-hsb.tex +++ b/Master/texmf-dist/tex/generic/pst-hsb/pst-hsb.tex @@ -1,4 +1,4 @@ -%% $Id: pst-hsb.tex 350 2021-12-16 10:20:18Z herbert $ +%% $Id: pst-hsb.tex 686 2023-04-02 13:03:12Z herbert $ %% %% This is file `pst-hsb.tex', %% @@ -6,7 +6,7 @@ %% %% Package `pst-hsb.tex' %% -%% Denis Girout +%% Denis Girou %% Manuel Luque %% Herbert Voss <hvoss@tug.org> %% @@ -29,16 +29,26 @@ % interface to the `xkeyval' package \pst@addfams{pst-hsb} % -\def\fileversion{0.02} -\def\filedate{2021/12/16} +\def\fileversion{0.03} +\def\filedate{2023/04/02} \message{`PST-hsb' v\fileversion, \filedate\space (hv)} % -\define@key[psset]{pst-hsb}{HueBegin}{\def\psparametricplotHSB@HueBegin{#1}}% Between 0 and 1 -\define@key[psset]{pst-hsb}{HueEnd}{\def\psparametricplotHSB@HueEnd{#1}}% Between 0 and 1 +\define@key[psset]{pst-hsb}{HueBegin}{\def\psHSB@HueBegin{#1}}% 0..1 H +\define@key[psset]{pst-hsb}{HueEnd}{\def\psHSB@HueEnd{#1}}% 0..1 H +\define@key[psset]{pst-hsb}{SaturationBegin}{\def\psHSB@SaturationBegin{#1}}% 0..1 S +\define@key[psset]{pst-hsb}{SaturationEnd}{\def\psHSB@SaturationEnd{#1}}% 0..1 S +\define@key[psset]{pst-hsb}{BrightnessBegin}{\def\psHSB@BrightnessBegin{#1}}% 0..1 B +\define@key[psset]{pst-hsb}{BrightnessEnd}{\def\psHSB@BrightnessEnd{#1}}% 0..1 B +\define@key[psset]{pst-hsb}{ColorBegin}{\pst@getcolor{#1}\ps@ColorBegin} +\define@key[psset]{pst-hsb}{ColorEnd}{\pst@getcolor{#1}\ps@ColorEnd} \define@boolkey[psset]{pst-hsb}[Pst@]{HSB}[true]{} % Default values -\psset[pst-hsb]{HueBegin=0,HueEnd=1,HSB=true} -\psset{dimen=outer} +\psset[pst-hsb]{ + HueBegin=0,HueEnd=1, + SaturationBegin=1, SaturationEnd=1, + BrightnessBegin=1, BrightnessEnd=1, + HSB=true,ColorBegin=white,ColorEnd=black} +\psset{dimen=outer,variableColor=false} \def\psparametricplotHSB{\pst@object{psparametricplotHSB}} \def\psparametricplotHSB@i#1#2#3{{% @@ -69,11 +79,23 @@ {\ifPst@HSB % Other points than the first one /PointY exch def /PointX exch def - Counter \psk@plotpoints\space div - \psparametricplotHSB@HueEnd\space - \psparametricplotHSB@HueBegin\space sub mul - \psparametricplotHSB@HueBegin\space add - 1 1 sethsbcolor + Counter \psk@plotpoints\space div /Factor ED + \psHSB@HueEnd\space + \psHSB@HueBegin\space sub % HueEnd-HueBegin + dup 0 eq { pop \psHSB@HueBegin\space } + { Factor mul \psHSB@HueBegin\space add } ifelse + /H_hsb ED + \psHSB@SaturationEnd\space + \psHSB@SaturationBegin\space sub + dup 0 eq { pop \psHSB@SaturationBegin\space } + { Factor mul \psHSB@SaturationBegin\space add } ifelse + /S_hsb ED + \psHSB@BrightnessEnd\space + \psHSB@BrightnessBegin\space sub + dup 0 eq { pop \psHSB@BrightnessBegin\space } + { Factor mul \psHSB@BrightnessBegin\space add } ifelse + /B_hsb ED + H_hsb S_hsb B_hsb sethsbcolor % H S B was on stack OldX OldY PointX PointY lineto lineto stroke PointX PointY moveto @@ -88,6 +110,12 @@ \begin@OpenObj \pst@getcoor{#1}\pst@tempA \pst@getcoor{#2}\pst@tempB +% \typeout{\psHSB@HueEnd~ +% \psHSB@HueBegin~ +% \psHSB@SaturationBegin~ +% \psHSB@SaturationEnd~ +% \psHSB@BrightnessBegin~ +% \psHSB@BrightnessEnd}% \addto@pscode{% \pst@tempA /y0 ED /x0 ED @@ -97,6 +125,11 @@ /m y1 y0 sub x1 x0 sub div def /t x0 dx sub def /Counter 0 def + \ifPst@variableColor + /startWave + lambda dColor add dup /lambda ED + tx@addDict begin wavelengthToRGB Red Green Blue end setrgbcolor + \fi gsave x0 y0 translate \psk@plotpoints { @@ -105,20 +138,37 @@ t dup m mul 1 Counter eq { moveto currentpoint /OldY ED /OldX ED } % First point - {\ifPst@HSB % Other points than the first one + {\ifPst@HSB % Other points than the first one /PointY exch def /PointX exch def - Counter \psk@plotpoints\space div - \psparametricplotHSB@HueEnd\space - \psparametricplotHSB@HueBegin\space sub mul - \psparametricplotHSB@HueBegin\space add - 1 1 sethsbcolor + Counter \psk@plotpoints\space div /Factor ED + \psHSB@HueEnd\space + \psHSB@HueBegin\space sub % HueEnd-HueBegin + dup 0 eq { pop \psHSB@HueBegin\space } + { Factor mul \psHSB@HueBegin\space add } ifelse + /H_hsb ED + \psHSB@SaturationEnd\space + \psHSB@SaturationBegin\space sub + dup 0 eq { pop \psHSB@SaturationBegin\space } + { Factor mul \psHSB@SaturationBegin\space add } ifelse + /S_hsb ED + \psHSB@BrightnessEnd\space + \psHSB@BrightnessBegin\space sub + dup 0 eq { pop \psHSB@BrightnessBegin\space } + { Factor mul \psHSB@BrightnessBegin\space add } ifelse + /B_hsb ED + H_hsb S_hsb B_hsb sethsbcolor % H S B was on stack OldX OldY PointX PointY lineto lineto stroke PointX PointY moveto - /OldX PointX def /OldY PointY def - \else lineto \fi - } ifelse + /OldX PointX def /OldY PointY def + \else + \ifPst@variableColor + \else + lineto + \fi + \fi + } ifelse } repeat grestore }% diff --git a/Master/texmf-dist/tex/latex/pst-hsb/pst-hsb.sty b/Master/texmf-dist/tex/latex/pst-hsb/pst-hsb.sty index 0a8996be217..a5a398fb745 100644 --- a/Master/texmf-dist/tex/latex/pst-hsb/pst-hsb.sty +++ b/Master/texmf-dist/tex/latex/pst-hsb/pst-hsb.sty @@ -8,4 +8,4 @@ % \@addtofilelist{pst-hsb.pro}}{}% \endinput -%% $Id: pst-hsb.sty 350 2021-12-16 10:20:18Z herbert $ +%% $Id: pst-hsb.sty 352 2021-12-16 17:14:59Z herbert $ |