summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pstricks-add
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-09-18 22:22:28 +0000
committerKarl Berry <karl@freefriends.org>2013-09-18 22:22:28 +0000
commit03b4781dee398a30d033aab5f007883e2f844ccc (patch)
tree7dfced1fc9418c49b31fb7fa9021fdd53c497f38 /Master/texmf-dist/tex/generic/pstricks-add
parent5ad7dc311f361321a959e40505240a7d1b5e5cd2 (diff)
pstricks-add (18sep13)
git-svn-id: svn://tug.org/texlive/trunk@31695 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pstricks-add')
-rw-r--r--Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex56
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
%