summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pstricks-add
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-10-22 00:37:36 +0000
committerKarl Berry <karl@freefriends.org>2007-10-22 00:37:36 +0000
commitbb5fa8d3a61725395fb2e078e52f4ede24b33ae9 (patch)
tree6f7df862c9d0134b5fa82a971c31644e74ee67c3 /Master/texmf-dist/tex/generic/pstricks-add
parentf6d12e1de2869816f6fb6bb59f3266544bee5588 (diff)
pstricks-add update (21oct07)
git-svn-id: svn://tug.org/texlive/trunk@5253 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.tex66
1 files changed, 46 insertions, 20 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 f30244f185b..ec822fca6f9 100644
--- a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
+++ b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
@@ -5,7 +5,7 @@
%%
%% Package `pstricks-add.tex'
%%
-%% Dominique Rodriguez <Dominique.Rodriguez _at_ waika9.fr>
+%% Dominique Rodriguez <DR _at_ pstricks.de>
%% Herbert Voss <Herbert.Voss _at_ pstricks.de>
%%
%% This program can be redistributed and/or modified under the terms
@@ -27,8 +27,8 @@
\ifx\MultidoLoaded\endinput\else \input multido \fi
\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi
%
-\def\fileversion{2.90}
-\def\filedate{2007/09/25}
+\def\fileversion{2.91}
+\def\filedate{2007/10/20}
\message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)}
%
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
@@ -53,6 +53,7 @@
%\psset{dx=0}%
%\psset{dy=0}%
\newcount\@zero\@zero=0\relax
+\chardef\f@ur=4
%
\def\psPiFour{12.566371}
\def\psPiTwo{6.283185}
@@ -200,17 +201,17 @@
\pst@getangle{#2}\pst@tempB%
\leavevmode%
\pst@Verb{%
- \pst@tempA /yRot ED /xRot ED
- \pst@tempB dup cos /cosA ED sin /sinA ED
- /ax cosA def
- /by sinA def
- /cx sinA neg def
- /dy cosA def
- /ex xRot cosA mul neg xRot add yRot sinA mul add def
- /fy xRot sinA mul neg yRot add yRot cosA mul sub def
- { [ax by cx dy ex fy] concat } \tx@TMChange }%
+ { \pst@tempA /yRot ED /xRot ED
+ \pst@tempB dup cos /cosA ED sin /sinA ED
+ /ax cosA def
+ /by sinA def
+ /cx sinA neg def
+ /dy cosA def
+ /ex xRot cosA mul neg xRot add yRot sinA mul add def
+ /fy xRot sinA mul neg yRot add yRot cosA mul sub def
+ [ax by cx dy ex fy] concat } \tx@TMChange }%
\box\pst@hbox%
- \pst@Verb{\tx@TMRestore }\endgroup}
+ \pst@Verb{ \tx@TMRestore }\endgroup}
%
% [#1]: obtargs; (#2,#3): center; {#4}: factor; {#5}: object
\def\psHomothetie{\pst@object{psHomothetie}}
@@ -2604,11 +2605,15 @@
\pst@stroke
\end@SpecialObj%
}
+%
\define@key[psset]{pstricks-add}{StepType}{\pst@expandafter\psset@@StepType{#1}\@nil}%
\def\psset@@StepType#1#2\@nil{%
\ifx#1u\let\psk@StepType\@ne
- \else\ifx#1l\let\psk@StepType\z@\else\let\psk@StepType\tw@\fi\fi}
-\psset{StepType=lower} % alternative StepType=upper StepType=Riemann
+ \else\ifx#1l\let\psk@StepType\z@
+ \else\ifx#1i\let\psk@StepType\thr@@
+ \else\ifx#1s\let\psk@StepType\f@ur
+ \else\let\psk@StepType\tw@\fi\fi\fi\fi}
+\psset{StepType=lower} % alternative StepType=upper/inf/sup/Riemann
%
\def\psStep{\pst@object{psStep}}
\def\psStep@i(#1,#2)#3#4{%
@@ -2619,14 +2624,14 @@
/dx #2 #1 sub #3 div def
/scx { \pst@number\psxunit mul } def
/scy { \pst@number\psyunit mul } def
- \ifcase\psk@StepType % 0->lower
+ \ifcase\psk@StepType % 0->lower, height is always f(x)
x scx 0 moveto
#3 {
\ifPst@algebraic Func \else #4 \fi scy dup x scx exch lineto
/x x dx add def
x scx exch lineto x scx 0 lineto
} repeat
- \or % 1-> upper
+ \or % 1-> upper, height is always f(x+dx)
x scx 0 moveto
#3 {
/x x dx add def
@@ -2658,6 +2663,27 @@
/yMax ED /yMin ED /x ED
x yMin moveto dx 0 rlineto x dx add yMax lineto
dx neg 0 rlineto x yMin lineto } repeat
+ \or % 3->inf(imum)
+ x scx 0 moveto
+ #3 {
+ \ifPst@algebraic Func \else #4 \fi /y0 ED % left value f(x)
+ /xOld x def
+ /x x dx add def
+ \ifPst@algebraic Func \else #4 \fi /y1 ED % right value f(x+dx)
+ y0 y1 lt { y0 }{ y1 } ifelse % use infimum
+ scy dup xOld scx exch lineto
+ x scx exch lineto x scx 0 lineto
+ } repeat
+ \or % 4-> sup(remum)
+ x scx 0 moveto
+ #3 {
+ \ifPst@algebraic Func \else #4 \fi /y0 ED % left value f(x)
+ /x x dx add def
+ \ifPst@algebraic Func \else #4 \fi /y1 ED % right value f(x+dx)
+ y0 y1 gt { y0 }{ y1 } ifelse % use supremum
+ scy dup x dx sub scx exch lineto
+ x scx exch lineto x scx 0 lineto
+ } repeat
\fi
}%
\psk@fillstyle
@@ -3082,9 +3108,9 @@
}
\psset{%
%%%% pstricks %%%%%%%%
- opacity=1,
- blendmode=0,
- shapealpha=0.6,
+% opacity=1,
+% blendmode=0,
+% shapealpha=0.6,
unit=1cm,%
swapaxes=false,%
showpoints=false,%