summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-04-19 00:34:18 +0000
committerKarl Berry <karl@freefriends.org>2008-04-19 00:34:18 +0000
commit4e2ac77b6408065820377abd25541151953797dd (patch)
tree597a01cdcbfe6ef38d48bb76838f78cfb61f7f39 /Master/texmf-dist/tex/generic/pstricks/pstricks.tex
parentd326aac622c002c9b2288faf17513607d247a7a3 (diff)
pstricks 1.22 (17apr08)
git-svn-id: svn://tug.org/texlive/trunk@7504 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pstricks/pstricks.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pstricks/pstricks.tex134
1 files changed, 99 insertions, 35 deletions
diff --git a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
index bb18c11cc13..dcb89080527 100644
--- a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
+++ b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
@@ -20,8 +20,8 @@
% See the PSTricks User's Guide for description.
% This uses the header file `pstricks.pro'.
%
-\def\fileversion{1.20}
-\def\filedate{2008/01/01}
+\def\fileversion{1.22}
+\def\filedate{2008/04/14}
%
\csname PSTricksLoaded\endcsname
\let\PSTricksLoaded\endinput
@@ -642,7 +642,7 @@
\def\psk@origin{}
%
\newif\ifswapaxes
-\def\psset@swapaxes#1{%
+\def\psset@swapaxes#1{% \if@pst
\@nameuse{@pst#1}%
\if@pst\def\psk@swapaxes{-90 rotate -1 1 scale }%
\else\def\psk@swapaxes{}%
@@ -769,6 +769,18 @@
}
\psset{linecap=0}
%--------------------------------- hv 2006-04-29 end ---------------------
+%------------------------- Transparency modes ----------------------------
+\pst@def{setTransparency}< \psk@opacityalpha .setopacityalpha >
+\pst@def{setStrokeTransparency}< \psk@strokeopacityalpha .setopacityalpha >
+\pst@def{setBlendmode}<
+ \ifcase\psk@blendmode
+ /Normal \or
+ /Compatible \or
+ /Screen \or
+ /Multiply %\or
+% /Hardlight
+ \fi
+ .setblendmode \psk@shapealpha .setshapealpha >
%
%--------------------------------- hv 2007-09-09 begin ---------------------
% transparency needs a run through latex -> dvips -> ps2pdf14(!)
@@ -791,19 +803,9 @@
\psset@blendmode{0}
%
\def\psfs@none{}
-\def\psfs@solid{\pst@fill{\pst@usecolor\psfillcolor \psk@opacityalpha .setopacityalpha fill }}
-\def\psfs@eofill{\pst@fill{\pst@usecolor\psfillcolor \psk@opacityalpha .setopacityalpha eofill}}
-\def\psfs@shape{%
- \pst@fill{
- \pst@usecolor\psfillcolor
- \ifcase\psk@blendmode
- /Normal \or
- /Compatible \or
- /Screen \or
- /Multiply %\or
-% /Hardlight
- \fi
- .setblendmode \psk@shapealpha .setshapealpha fill }}
+\def\psfs@solid{\pst@fill{\pst@usecolor\psfillcolor \tx@setTransparency fill }}
+\def\psfs@eofill{\pst@fill{\pst@usecolor\psfillcolor \tx@setTransparency eofill}}
+\def\psfs@shape{\pst@fill{ \pst@usecolor\psfillcolor \tx@setBlendmode fill }}
%
%--------------------------------- hv 2007-09-09 end ---------------------
%
@@ -907,9 +909,9 @@
\psset@arrowlength{1.4}
\def\psset@arrowinset#1{\pst@checknum{#1}\psk@arrowinset}%
\psset@arrowinset{.4}
-\def\tx@Arrow{ \psk@strokeopacityalpha .setopacityalpha Arrow }% hv 2008-01-13
+\def\tx@Arrow{ \tx@setStrokeTransparency Arrow }% hv 2008-01-13
% new definitions of the missing arrows ---- hv 1.1.2
-\def\tx@ArrowD{ \psk@strokeopacityalpha .setopacityalpha ArrowD }% hv 2008-01-13
+\def\tx@ArrowD{ \tx@setStrokeTransparency ArrowD }% hv 2008-01-13
%
\@namedef{psas@<|}{
\psk@tbarsize\space \tx@Tbar
@@ -935,7 +937,7 @@
\psk@bracketlength\space \psk@tbarsize\space \tx@BracketOut
}
% )-( arrow
-\def\tx@RoundBracketOut{ \psk@strokeopacityalpha .setopacityalpha RoundBracketOut }% hv 2008-01-13
+\def\tx@RoundBracketOut{ \tx@setStrokeTransparency RoundBracketOut }% hv 2008-01-13
\@namedef{psas@(}{%
/RoundBracketOut {%
CLW mul add dup 2 div
@@ -1025,7 +1027,7 @@
}
\def\psas@{}
\psset@arrows{-}
-\def\tx@SD{ \psk@opacityalpha .setopacityalpha SD }
+\def\tx@SD{ \tx@setTransparency SD }
\def\tx@EndDot{EndDot }
\def\psas@oo{{\pst@usecolor\psfillcolor true} true \psk@dotsize \tx@EndDot}
\def\psas@o{{\pst@usecolor\psfillcolor true} false \psk@dotsize \tx@EndDot}
@@ -1226,7 +1228,7 @@
gsave
\pst@number\pslinewidth SLW
\pst@usecolor\pslinecolor
- \psk@strokeopacityalpha .setopacityalpha % hv 2008-01-13
+ \tx@setStrokeTransparency % hv 2008-01-13
\@nameuse{psls@\pslinestyle}
grestore}%
\fi}
@@ -1815,6 +1817,7 @@
\newdimen\pslinearc
\def\psset@linearc#1{\pssetlength\pslinearc{#1}}
\psset@linearc{0pt}
+%
\def\psline{\pst@object{psline}}
\def\psline@i{%
\pst@getarrows{%
@@ -1926,6 +1929,9 @@
\def\tx@OpenBezier{OpenBezier }
\def\tx@ClosedBezier{ClosedBezier }
\def\tx@BezierShowPoints{BezierShowPoints }
+\def\tx@BezierCurve{BezierCurve }
+\def\pst@BezierType{2 } % the default
+%
\def\psbezier{\pst@object{psbezier}}
\def\psbezier@i{%
\pst@getarrows{%
@@ -1954,6 +1960,28 @@
\ifshowpoints \tx@BezierShowPoints \fi}%
\chardef\pst@linetype=1
\end@ClosedObj}
+
+\iffalse
+\def\psset@epsilon#1{\pst@checknum{#1}\psk@epsilon}
+\psset@epsilon{0.005} % 200 steps for one curve
+%
+\def\psBezier#1{% % allowed order is 1 ... 9
+ \ifnum#1>0 \ifnum#1<10 \def\pst@BezierType{#1 }\fi\fi%
+ \pst@object{psBezier}}
+\def\psBezier@i{%
+ \pst@getarrows{%
+ \begin@OpenObj
+ \pst@getcoors[\psBezier@ii%
+}}
+\def\psBezier@ii{%
+ \addto@pscode{%
+ \psk@epsilon % step for Bezier T=0,0+epsilon,0+i*epsilon,...,1
+ \pst@BezierType % type of the Bezier curve 2,3,4,...
+ \tx@BezierCurve
+ \ifshowpoints \tx@BezierShowPoints \fi
+ }%
+ \end@OpenObj}
+\fi
%
\def\tx@Parab{Parab }
\def\psparabola{\pst@object{psparabola}}% 1.15a 2006-01-05 (hv)
@@ -2062,7 +2090,7 @@
\the\everypsbox%
}
\def\pst@endbox{%
- \ifnum\pst@mathflag>\z@$\fi
+ \ifnum\pst@mathflag>\z@$\fi %$
\egroup
\pst@afterbox%
}
@@ -2090,7 +2118,7 @@
}
\def\pst@endlongbox{%
\endgroup
- \ifnum\pst@mathflag>\z@$\fi
+ \ifnum\pst@mathflag>\z@$\fi %$
\egroup%
}
\def\pslongbox#1#2{%
@@ -2723,6 +2751,26 @@ pop
\fi
\ignorespaces}
%
+\def\pscircleOA{\pst@object{pscircleOA}}% hv 2008-04-14
+\def\pscircleOA@i(#1)(#2){%
+ \begin@ClosedObj
+ \pst@getcoor{#1}\pst@tempA
+ \pst@@getcoor{#2}%
+ \def\pst@linetype{4}%
+ \addto@pscode{
+ \pst@tempA % x0 y0
+ 2 copy % xO yO xO yO
+ \pst@coor % xO yO xO yO xA yA
+ Pyth2 % xO yO radius
+ \psk@dimen CLW mul sub
+ \if@star \tx@SD \else
+ 0 360 arc
+ closepath
+ \fi }%
+ \showpointsfalse
+ \end@ClosedObj
+ \ignorespaces}
+%
\def\qdisk(#1)#2{%
\def\pst@par{}%
\begin@SpecialObj
@@ -2734,9 +2782,10 @@ pop
\def\psset@radius#1{\pst@@getlength{#1}\psk@radius}
\psset@radius{.25cm}
%
-\def\psCircle{\pst@object{psCircle}}
+\def\psCircle{\pst@object{psCircle}}% same as \pscircle, but uses \psk@radius
\def\psCircle@i{\@ifnextchar({\psCircle@ii}{\psCircle@ii(0,0)}}
\def\psCircle@ii(#1){\pscircle@do(#1){\psk@radius}}
+%
\def\pswedge{\pst@object{pswedge}}
\def\pswedge@i{\@ifnextchar({\pswedge@ii}{\pswedge@ii(0,0)}}
\def\pswedge@ii(#1)#2#3#4{%
@@ -3182,8 +3231,16 @@ pop
\psset@showgrid{false}
%
\newdimen\pst@shift
-\def\psset@shift#1{\pssetlength\pst@dimg{#1}%
- \pst@shift\pst@dimg}
+\newif\ifPst@shift@star
+\def\psset@shift#1{%
+ \ifx#1*
+ \global\Pst@shift@startrue
+ \pst@shift=\p@
+ \else
+ \global\Pst@shift@starfalse
+ \pssetlength\pst@dimg{#1}
+ \global\pst@shift\pst@dimg% only the outer pspicture env can have a shift
+ \fi}
% \global\pst@shift\pst@dimg}
\psset@shift{0}
% ----------- 1.10/12 end hv -------------------
@@ -3225,10 +3282,10 @@ pop
% \ignorespaces%
}
\def\pic@coor{(0,0)(0,0)(10,10)}
-\newdimen\pst@shift
+%\newdimen\pst@shift
\def\endpspicture{%
\pst@killglue
- \global\pst@shift=\pst@shift% in fact of the following endgroup
+% \global\pst@shift=\pst@shift% in fact of the following endgroup
\endgroup
\egroup
\ifdim\wd\pst@hbox=\z@\else
@@ -3239,12 +3296,18 @@ pop
\dp\pst@hbox=-\pst@dimb
\setbox\pst@hbox=\hbox{%
\kern-\pst@dima
-% ----------- 1.10/12 beg hv -------------------
-% \advance\pst@dimd-\pst@dimb%
-% \pst@dimd=\pst@shift\pst@dimd%
-% \advance\pst@dimd\pst@dimb
- \pst@dimd-\pst@shift
-% ----------- 1.10/12 end hv -------------------
+% Orig version ----------
+%\ifx\pst@tempa\@empty\else
+%\advance\pst@dimd-\pst@dimb
+%\pst@dimd=\pst@tempa\pst@dimd
+%\advance\pst@dimd\pst@dimb
+%\lower\pst@dimd
+%\fi
+%----- end Orig
+ \ifPst@shift@star\typeout{==pstricks== old behaviour of the shift option}% shift=*
+ \advance\pst@dimd-\pst@dimb
+ \pst@dimd=0.5\pst@dimd
+ \else\pst@dimd-\pst@shift\fi
\advance\pst@dimd\pst@dimb
\lower\pst@dimd%
\box\pst@hbox%
@@ -3252,8 +3315,9 @@ pop
\if@star\setbox\pst@hbox=\hbox{\clipbox@@\z@}\fi
\leavevmode\box\pst@hbox
\endgroup%
- \global\pst@shift\z@% restore value
+ \psset@shift{0}% reset value
}
+%
\@namedef{pspicture*}{\pspicture*}
\@namedef{endpspicture*}{\endpspicture}
%