summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pstricks/pstricks.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pstricks/pstricks.tex79
1 files changed, 59 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
index bae2c3ba6ef..33f6234ab74 100644
--- a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
+++ b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
@@ -103,8 +103,8 @@
\input pgffor.code.tex
\let\pgfforeach\foreach
%
-\def\fileversion{2.43}
-\def\filedate{2013/05/12}
+\def\fileversion{2.44}
+\def\filedate{2013/06/24}
\catcode`\@=11\relax
\pst@addfams{pstricks}
%
@@ -581,20 +581,48 @@
\gdef\pslbrace[{ ]
\gdef\psrbrace[} ]
\endgroup
+
+\pstVerb{
+ /pssetRGBcolor /setrgbcolor load def
+ /pssetCMYKcolor /setcmykcolor load def
+ /pssetGraycolor /setgray load def
+}
\def\@newcolor#1#2{%
-\expandafter\edef\csname #1\endcsname{\noexpand\pst@color{#2}}%
-%\expandafter\edef\csname color@#1\endcsname{#2}%
-\expandafter\edef\csname\string\color@#1\endcsname{#2}% hv 1.14 2005-12-17
-\ignorespaces}
+ \expandafter\edef\csname #1\endcsname{\noexpand\pst@color{#2}}%
+ %\expandafter\edef\csname color@#1\endcsname{#2}%
+ \expandafter\edef\csname\string\color@#1\endcsname{#2}% hv 1.14 2005-12-17
+ \ignorespaces}
\def\pst@color#1{%
-\def\pst@currentcolor{#1}\pstVerb{#1}\aftergroup\pst@endcolor}
+ \def\pst@currentcolor{#1}\pstVerb{#1}\aftergroup\pst@endcolor}%
\def\pst@endcolor{\pstVerb{\pst@currentcolor}}
\def\pst@currentcolor{0 setgray}
\def\altcolormode{%
\def\pst@color##1{%
-\pstVerb{gsave ##1}\aftergroup\pst@endcolor}%
+ \pstVerb{gsave ##1}\aftergroup\pst@endcolor}%
\def\pst@endcolor{\pstVerb{\pst@grestore}}}
-\def\pst@grestore{%
+\def\pssetMonochrome{%
+ \pstVerb{
+ /setrgbcolor { add add 0 gt {0}{1} ifelse setgray } def
+ /setcmykcolor{ 4 dict begin
+ /k ED /y ED /m ED /c ED
+ 1 1 k sub c mul k add sub 0.29 mul
+ 1 1 k sub m mul k add sub 0.587 mul add
+ 1 1 k sub y mul k add sub 0.114 mul add
+ end 0 gt {0}{1} ifelse setgray } def }}
+\def\pssetGrayscale{%
+ \pstVerb{
+ /setrgbcolor { 0.07 mul exch 0.71 mul add exch 0.21 mul add setgray } def
+ /setcmykcolor{ 4 dict begin
+ /k ED /y ED /m ED /c ED
+ 1 1 k sub c mul k add sub 0.29 mul
+ 1 1 k sub m mul k add sub 0.587 mul add
+ 1 1 k sub y mul k add sub 0.114 mul add
+ end setgray } def }}
+\def\psresetColor{\pstVerb{
+ /setrgbcolor tx@Dict begin /pssetRGBcolor load end def
+ /setcmykcolor tx@Dict begin /pssetCMYKcolor load end def }}
+
+\def\pst@grestore{
currentpoint
matrix currentmatrix
currentfont
@@ -841,7 +869,7 @@
\ifx#1*\relax% algebraic PostScript code: x f(x)
\global\pst@C@@rType=4\relax%
\else
- \ifx#1+\relax% algebraic PostScript code: x, (f(x)
+ \ifx#1+\relax% algebraic algebraic: x, f(x)
\global\pst@C@@rType=8\relax%
\else
\ifx#4;\relax% polar coordinates
@@ -933,23 +961,34 @@
%
\def\raw@coor#1;#2\@nil{% PostScript code
\edef\pst@coor{%
- #1 \pst@number\psyunit mul exch \pst@number\psxunit mul exch }}
+ #1 \tx@ScreenCoor }}
+%
+\def\alg@coor{\@ifnextchar*{\alg@@coor}{\alg@@@@coor}}
+\def\alg@@coor*#1;#2\@nil{\expandafter\alg@@@coor#1\@nil}
+\def\alg@@@coor#1 #2\@nil{% algebraic PostScript code
+\typeout{Nummer1: #1}%
+\typeout{Nummer2: #2}%
+ \edef\pst@coor{%
+ /Func (#1) AlgParser cvx def
+ /y #2 def
+ y Func exch \tx@ScreenCoor }}
%
-\def\alg@coor#1;#2\@nil{\expandafter\alg@@@coor#1}
-\def\alg@@@coor#1 #2{% algebraic PostScript code
+\def\alg@@@@coor#1;#2\@nil{\expandafter\alg@@@@@coor#1\@nil}
+\def\alg@@@@@coor#1 #2\@nil{% algebraic PostScript code
\edef\pst@coor{%
/x #1 def
- /Func (#2) AlgParser cvx def
- x Func
- \pst@number\psyunit mul exch \pst@number\psxunit mul exch }}
+ /Func (#2) AlgParser cvx def
+ x Func \tx@ScreenCoor }}
+%
+\define@boolkey[psset]{}[Pst@]{exchange}[true]{}
+\psset{exchange=false}
%
-\def\algalg@coor#1;#2\@nil{\expandafter\algalg@@@coor#1}
-\def\algalg@@@coor#1,#2{% algebraic algebraic code
+\def\algalg@coor#1;#2\@nil{\expandafter\algalg@@@coor#1\@nil}
+\def\algalg@@@coor#1,#2\@nil{% algebraic algebraic code
\edef\pst@coor{%
/x (#1) AlgParser cvx def
/Func (#2) AlgParser cvx def
- x Func
- \pst@number\psyunit mul exch \pst@number\psxunit mul exch }}
+ x Func \tx@ScreenCoor }}
%
\def\node@coor#1\@nil{%
\@pstrickserr{You must load `pst-node.tex' to use node coordinates.}\@ehps