diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex | 56 |
1 files changed, 50 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex index 71449f6e718..3c2a480e948 100644 --- a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex +++ b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex @@ -1,4 +1,4 @@ -%% $Id: pstricks-add.tex 741 2013-01-01 16:08:58Z herbert $ +%% $Id: pstricks-add.tex 825 2013-09-18 12:10:17Z herbert $ %% %% %% This is file `pstricks-add.tex', @@ -31,8 +31,8 @@ \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi \ifx\PSTmathLoaded\endinput\else \input pst-math \fi % -\def\fileversion{3.60} -\def\filedate{2013/01/01} +\def\fileversion{3.61} +\def\filedate{2013/09/18} \message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)} % \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax @@ -2367,8 +2367,8 @@ a add /Ytb Yp Xp R mul A div sub B2 mul Q div def 0 Xta Yp mul Yta Xp mul sub gt % swap a, b { /A Xta def /B Yta def /Xta Xtb def /Yta Ytb def /Xtb A def /Ytb B def } if - Xta Xc add Yta Yc add ) {#42}% - \pnode(! Xtb Xc add Ytb Yc add ) {#41}% + Xta Xc add Yta Yc add ){#42}% + \pnode(! Xtb Xc add Ytb Yc add ){#41}% \ignorespaces}% % \define@key[psset]{pstricks-add}{rotate}{\def\psk@rotate{#1 }} @@ -2433,6 +2433,48 @@ a add \multido{\iA=0+1}{#1}{\rput{\psk@@rotate}(0,0){\psline(0,0)(#2;\iA)}}% }\ignorespaces}% % +\define@key[psset]{pstricks-add}{colSteps}{\def\psk@colSteps{#1 }} +\define@boolkey[psset]{pstricks-add}[Pst@]{colored}[true]{} +\psset[pstricks-add]{colSteps=0,colored=false}% continuing colors and grayscale +% +\def\pstContour{\pst@object{pstContour}} +\def\pstContour@i#1{% +\begin@SpecialObj% + \addto@pscode{ + (#1) run + /zMax 0 def /zMin 0 def % lowest and highest value + contourdata aload length /N ED % get the no of arrays + N{ % inside contourdata + /data ED % save first inner array + data aload length 3 div round cvi { % get the records + dup zMin lt % z<zMin? + { /zMin ED } % yes, save it + { dup zMax gt { /zMax ED }{ pop } ifelse } ifelse + pop pop % delete x y + } repeat + } repeat + clear % clear stack + /dz zMax zMin sub def % value range + /steps \psk@colSteps\space 0 gt { true }{ false } ifelse def + 0 1 N 1 sub { % for i=0 to N-1 + contourdata exch get /data ED % get first array + data aload length 3 div round cvi { + /z ED /y ED /x ED + z zMin sub dz div % relative z (0..1) + \ifPst@colored 400 mul 380 add tx@addDict begin wavelengthToRGB + Red Green Blue end setrgbcolor % set color + \else + steps {\psk@colSteps\space mul round \psk@colSteps\space div} if + setgray + \fi + x \pst@number\psxunit mul y \pst@number\psyunit mul + 1 0 360 arc fill + } repeat + } for + }% +\end@SpecialObj% +} + \def\resetOptions{% \def\pst@linetype{0}% \pstScalePoints(1,1){}{}% @@ -2453,7 +2495,9 @@ a add chartNodeI=0.75, chartNodeO=1.5, markAngle=false, - }} + colSteps=0, + colored=false, +}} % \resetOptions % |