diff options
Diffstat (limited to 'Master/texmf-dist/dvips/pstricks/pstricks.pro')
-rw-r--r-- | Master/texmf-dist/dvips/pstricks/pstricks.pro | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/Master/texmf-dist/dvips/pstricks/pstricks.pro b/Master/texmf-dist/dvips/pstricks/pstricks.pro index 0911f0eb0b9..9ea39830feb 100644 --- a/Master/texmf-dist/dvips/pstricks/pstricks.pro +++ b/Master/texmf-dist/dvips/pstricks/pstricks.pro @@ -1,4 +1,4 @@ -% $Id: pstricks.pro 872 2018-12-21 20:39:31Z herbert $ +% $Id: pstricks.pro 4 2020-06-09 08:32:19Z herbert $ % %% PostScript prologue for pstricks.tex. %% Version 1.30, 2018/12/17 @@ -62,13 +62,20 @@ tx@Dict begin % /NET { neg exch neg exch T } def % change coordinate system to the negative one /Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter +/addCoors { + 3 -1 roll % xA xB yB yA + add % xA xB yB+yA + 3 1 roll % yB+yA xA xB + add % yB+yA xA+xB + exch % xA+xB yA+yB +} def /Pyth2 { % Pythagoras, xA yA xB yB 3 -1 roll % xA xB yB yA sub % xA xB yB-yA 3 1 roll % yB-yA xA xB sub % yB-yA xA-xB Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian (origimal) +/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian (original) /PtoCrel { pst@angleunit PtoC } def % Polar to Cartesian with \degrees[??] /PtoCab { dup cos 4 -1 roll mul 3 1 roll sin mul } def % Polar to Cartesian (Ellipse) a b phi-> x y /AnytoDeg { pst@angleunit } def @@ -989,7 +996,7 @@ gsave /s ED % \psk@subgriddiv s div dup 0 eq { pop 1 } if /dy ED s div dup 0 eq { pop 1 } if % \pst@number\psyunit abs - /dx ED dy div round dy mul % \pst@number\psxunit abs + /dx ED dy div round dy mul % \pst@number\psxunit abs /y0 ED dx div round dx mul /x0 ED dy div round cvi /y2 ED dx div round cvi @@ -1015,36 +1022,45 @@ gsave /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup xGridOffset add y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if + dup % run loop two times: lines and labels + { i dx mul dup xGridOffset add y0 moveto % draw the lines dup t f moveto g t L stroke /i i w add def } repeat + /i x1 def + GridDX div ceiling cvi + { i dx mul GridDX mul dup xGridOffset add y0 moveto % plot the labels + b 0 gt + { gsave c i GridDX mul a cvs dup stringwidth pop /z2 ED + w 0 gt {z1} {z1 z2 add neg} ifelse + h 0 gt {b neg}{z1} ifelse exch GridDX div z2 2 div sub exch + rmoveto show grestore } if + /i i w add def + } repeat grestore gsave n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end { 2 setlinecap } ifelse /i y1 def /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if + dup % run loop two times: lines and labels { newpath i dy mul dup yGridOffset add x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop + dup f exch t moveto + g exch t L stroke + /i i h add def + } repeat + /i y1 def + GridDY div ceiling cvi + { newpath i dy mul GridDY mul dup yGridOffset add x0 exch moveto + b 0 gt { gsave c i GridDY mul a cvs dup stringwidth pop /z2 ED w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse + h 0 gt {z1} {b neg} ifelse GridDY div b 2 div sub rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke /i i h add def } repeat grestore |