diff options
author | Karl Berry <karl@freefriends.org> | 2009-01-31 00:45:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-01-31 00:45:47 +0000 |
commit | afa0ddded45d19c7c2c4883359e3a26e59ce7a8c (patch) | |
tree | d0b0a712067e8d3ab5b8e79a6f72bef247c1ba02 /Master/texmf-dist/dvips | |
parent | 9ed0613d8c7efda754589bc5eac54d7193651494 (diff) |
pstricks 1.27 (30jan09)
git-svn-id: svn://tug.org/texlive/trunk@12021 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/dvips')
-rw-r--r-- | Master/texmf-dist/dvips/pstricks/pst-node.pro | 349 | ||||
-rw-r--r-- | Master/texmf-dist/dvips/pstricks/pstricks.pro | 155 |
2 files changed, 373 insertions, 131 deletions
diff --git a/Master/texmf-dist/dvips/pstricks/pst-node.pro b/Master/texmf-dist/dvips/pstricks/pst-node.pro index 5916c637eb1..72e43440fd9 100644 --- a/Master/texmf-dist/dvips/pstricks/pst-node.pro +++ b/Master/texmf-dist/dvips/pstricks/pst-node.pro @@ -1,7 +1,7 @@ -% $Id: pst-node.pro 26 2008-06-14 11:50:02Z herbert $ +% $Id: pst-node.pro 90 2009-01-30 10:58:51Z herbert $ %% %% PostScript prologue for pst-node.tex. -%% Version 1.00, 2008/01/01. +%% Version 1.02, 2009/01/30. %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives @@ -54,40 +54,105 @@ end Cos mul exch Sin mul } def % -/TriNodePos { Sin s lt { d NodeSep sub dup Cos mul Sin Div exch } { w h -mul w Sin mul h Cos abs mul add Div NodeSep add dup Cos mul exch Sin mul -} ifelse } def -/InitTriNode { sub 2 div exch 2 div exch 2 copy T 2 copy 4 index index /d -ED pop pop pop pop -90 mul rotate /NodeMtrx CM def /X 0 def /Y 0 def d -sub abs neg /d ED d add /h ED 2 div h mul h d sub Div /w ED /s d w Atan -sin def /NodePos { TriNodePos } def } def -/OvalNodePos { /ww w NodeSep add def /hh h NodeSep add def Sin ww mul Cos -hh mul Atan dup cos ww mul exch sin hh mul } def +/TriNodePos { + Sin s lt + { d NodeSep sub dup Cos mul Sin Div exch } + { w h mul w Sin mul h Cos abs mul add Div + NodeSep add dup Cos mul exch Sin mul + } ifelse +} def +% +/InitTriNode { + sub 2 div exch + 2 div exch + 2 copy T + 2 copy 4 index index /d ED + pop pop pop pop + -90 mul rotate + /NodeMtrx CM def + /X 0 def /Y 0 def + d sub abs neg /d ED + d add /h ED + 2 div h mul h d sub Div /w ED + /s d w Atan sin def + /NodePos { TriNodePos } def +} def +% +/OvalNodePos { + /ww w NodeSep add def + /hh h NodeSep add def + Sin ww mul Cos hh mul Atan dup cos ww mul exch sin hh mul +} def +% /GetCenter { begin X Y NodeMtrx transform CM itransform end } def % -/XYPos { dup sin exch cos Do /Cos ED /Sin ED /Dist ED Cos 0 gt { Dist - Dist Sin mul Cos div } { Cos 0 lt { Dist neg Dist Sin mul Cos div neg } - { 0 Dist Sin mul } ifelse } ifelse Do -} def -/GetEdge { dup 0 eq { pop begin 1 0 NodeMtrx dtransform CM idtransform - exch atan sub dup sin /Sin ED cos /Cos ED /NodeSep ED NodePos NodeMtrx - dtransform CM idtransform end } { 1 eq {{exch}} {{}} ifelse /Do ED pop - XYPos } ifelse -} def -/AddOffset { 1 index 0 eq { pop pop } { 2 copy 5 2 roll cos mul add 4 1 -roll sin mul sub exch } ifelse } def -/GetEdgeA { NodeSepA AngleA NodeA NodeSepTypeA GetEdge OffsetA AngleA -AddOffset yA add /yA1 ED xA add /xA1 ED } def -/GetEdgeB { NodeSepB AngleB NodeB NodeSepTypeB GetEdge OffsetB AngleB -AddOffset yB add /yB1 ED xB add /xB1 ED } def -/GetArmA { ArmTypeA 0 eq { /xA2 ArmA AngleA cos mul xA1 add def /yA2 ArmA -AngleA sin mul yA1 add def } { ArmTypeA 1 eq {{exch}} {{}} ifelse /Do ED -ArmA AngleA XYPos OffsetA AngleA AddOffset yA add /yA2 ED xA add /xA2 ED -} ifelse } def -/GetArmB { ArmTypeB 0 eq { /xB2 ArmB AngleB cos mul xB1 add def /yB2 ArmB -AngleB sin mul yB1 add def } { ArmTypeB 1 eq {{exch}} {{}} ifelse /Do ED -ArmB AngleB XYPos OffsetB AngleB AddOffset yB add /yB2 ED xB add /xB2 ED -} ifelse } def +/XYPos { + dup sin exch cos Do + /Cos ED /Sin ED /Dist ED + Cos 0 gt + { Dist Dist Sin mul Cos div } + { Cos 0 lt + { Dist neg Dist Sin mul Cos div neg } + { 0 Dist Sin mul } ifelse + } ifelse + Do +} def +% +/GetEdge { + dup 0 eq + { pop begin 1 0 NodeMtrx dtransform + CM idtransform + exch atan sub + dup + sin /Sin ED + cos /Cos ED + /NodeSep ED + NodePos NodeMtrx dtransform CM idtransform end } + { 1 eq {{exch}} {{}} ifelse /Do ED pop XYPos } ifelse +} def +% +/AddOffset { + 1 index 0 eq + { pop pop } + { 2 copy 5 2 roll cos mul add 4 1 roll sin mul sub exch } ifelse +} def +% +/GetEdgeA { + NodeSepA AngleA NodeA NodeSepTypeA GetEdge + OffsetA AngleA AddOffset + yA add /yA1 ED + xA add /xA1 ED +} def +% +/GetEdgeB { + NodeSepB AngleB NodeB NodeSepTypeB GetEdge + OffsetB AngleB AddOffset + yB add /yB1 ED + xB add /xB1 ED +} def +% +/GetArmA { + ArmTypeA 0 eq + { /xA2 ArmA AngleA cos mul xA1 add def + /yA2 ArmA AngleA sin mul yA1 add def } + { ArmTypeA 1 eq {{exch}} {{}} ifelse + /Do ED + ArmA AngleA XYPos OffsetA AngleA AddOffset + yA add /yA2 ED + xA add /xA2 ED } ifelse +} def +% +/GetArmB { + ArmTypeB 0 eq + { /xB2 ArmB AngleB cos mul xB1 add def + /yB2 ArmB AngleB sin mul yB1 add def } + { ArmTypeB 1 eq {{exch}} {{}} ifelse + /Do ED + ArmB AngleB XYPos OffsetB AngleB AddOffset + yB add /yB2 ED + xB add /xB2 ED } ifelse +} def +% /InitNC { /b ED /a ED % second and first node /NodeSepTypeB ED /NodeSepTypeA ED @@ -100,11 +165,25 @@ ArmB AngleB XYPos OffsetB AngleB AddOffset yB add /yB2 ED xB add /xB2 ED NodeB GetCenter /yB ED /xB ED } if } def % -/LPutLine { 4 copy 3 -1 roll sub neg 3 1 roll sub Atan /NAngle ED 1 t sub -mul 3 1 roll 1 t sub mul 4 1 roll t mul add /Y ED t mul add /X ED } def -/LPutLines { mark LPutVar counttomark 2 div 1 sub /n ED t floor dup n gt -{ pop n 1 sub /t 1 def } { dup t sub neg /t ED } ifelse cvi 2 mul { pop -} repeat LPutLine cleartomark } def +/LPutLine { + 4 copy + 3 -1 roll sub neg 3 1 roll sub Atan /NAngle ED + 1 t sub mul + 3 1 roll 1 t sub mul + 4 1 roll t mul add /Y ED + t mul add /X ED +} def +% +/LPutLines { + mark LPutVar counttomark 2 div 1 sub /n ED +% t floor dup n gt + t floor dup n ge % to allow npos<= hv 2008-08-14 + { pop n 1 sub /t 1 def } { dup t sub neg /t ED } ifelse + cvi 2 mul { pop } repeat + LPutLine + cleartomark +} def +% /BezierMidpoint { /y3 ED /x3 ED /y2 ED /x2 ED /y1 ED /x1 ED /y0 ED /x0 ED /t ED /cx x1 x0 sub 3 mul def /cy y1 y0 sub 3 mul def /bx x2 x1 sub 3 mul cx sub def /by y2 y1 sub 3 mul cy sub def /ax x3 x0 sub cx sub bx @@ -168,51 +247,110 @@ cvx def /LPutPos { t LPutVar BezierMidpoint } def /HPutPos { { HPutLines /HPutPos { HPutLines } def /VPutPos { VPutLines } def } def % -/NCAngle { GetEdgeA GetEdgeB GetArmB /mtrx AngleA matrix rotate def xB2 -yB2 mtrx itransform pop xA1 yA1 mtrx itransform exch pop mtrx transform -/y0 ED /x0 ED mark ArmB 0 ne { xB1 yB1 } if xB2 yB2 x0 y0 xA1 yA1 -tx@Dict begin false Line end /LPutVar [ xB1 yB1 xB2 yB2 x0 y0 xA1 yA1 ] -cvx def /LPutPos { LPutLines } def /HPutPos { HPutLines } def /VPutPos { -VPutLines } def } def -/NCBar { GetEdgeA GetEdgeB GetArmA GetArmB /mtrx AngleA matrix rotate def -xA2 yA2 mtrx itransform pop xB2 yB2 mtrx itransform pop sub dup 0 mtrx -transform 3 -1 roll 0 gt { /yB2 exch yB2 add def /xB2 exch xB2 add def } -{ /yA2 exch neg yA2 add def /xA2 exch neg xA2 add def } ifelse mark ArmB -0 ne { xB1 yB1 } if xB2 yB2 xA2 yA2 ArmA 0 ne { xA1 yA1 } if tx@Dict -begin false Line end /LPutVar [ xB1 yB1 xB2 yB2 xA2 yA2 xA1 yA1 ] cvx -def /LPutPos { LPutLines } def /HPutPos { HPutLines } def /VPutPos { -VPutLines } def } def -/NCDiag { GetEdgeA GetEdgeB GetArmA GetArmB mark ArmB 0 ne { xB1 yB1 } if -xB2 yB2 xA2 yA2 ArmA 0 ne { xA1 yA1 } if tx@Dict begin false Line end -/LPutVar [ xB1 yB1 xB2 yB2 xA2 yA2 xA1 yA1 ] cvx def /LPutPos { -LPutLines } def /HPutPos { HPutLines } def /VPutPos { VPutLines } def } -def -/NCDiagg { GetEdgeA GetArmA yB yA2 sub xB xA2 sub Atan 180 add /AngleB ED -GetEdgeB mark xB1 yB1 xA2 yA2 ArmA 0 ne { xA1 yA1 } if tx@Dict begin -false Line end /LPutVar [ xB1 yB1 xA2 yA2 xA1 yA1 ] cvx def /LPutPos { -LPutLines } def /HPutPos { HPutLines } def /VPutPos { VPutLines } def } -def -/NCLoop { GetEdgeA GetEdgeB GetArmA GetArmB /mtrx AngleA matrix rotate -def xA2 yA2 mtrx transform loopsize add /yA3 ED /xA3 ED /xB3 xB2 yB2 -mtrx transform pop def xB3 yA3 mtrx itransform /yB3 ED /xB3 ED xA3 yA3 -mtrx itransform /yA3 ED /xA3 ED mark ArmB 0 ne { xB1 yB1 } if xB2 yB2 -xB3 yB3 xA3 yA3 xA2 yA2 ArmA 0 ne { xA1 yA1 } if tx@Dict begin false -Line end /LPutVar [ xB1 yB1 xB2 yB2 xB3 yB3 xA3 yA3 xA2 yA2 xA1 yA1 ] -cvx def /LPutPos { LPutLines } def /HPutPos { HPutLines } def /VPutPos { -VPutLines } def } def +/NCAngle { + GetEdgeA GetEdgeB GetArmB + /mtrx AngleA matrix rotate def + xB2 yB2 mtrx itransform pop xA1 yA1 mtrx itransform exch pop mtrx transform + /y0 ED /x0 ED + mark + ArmB 0 ne { xB1 yB1 } if + xB2 yB2 x0 y0 xA1 yA1 + tx@Dict begin false Line end + /LPutVar [ xB1 yB1 xB2 yB2 x0 y0 xA1 yA1 ] cvx def + /LPutPos { LPutLines } def + /HPutPos { HPutLines } def + /VPutPos { VPutLines } def +} def +% +/NCBar { + GetEdgeA GetEdgeB GetArmA GetArmB + /mtrx AngleA matrix rotate def + xA2 yA2 mtrx itransform pop + xB2 yB2 mtrx itransform pop + sub dup 0 mtrx transform + 3 -1 roll 0 gt + { /yB2 exch yB2 add def /xB2 exch xB2 add def } + { /yA2 exch neg yA2 add def /xA2 exch neg xA2 add def } ifelse + mark + ArmB 0 ne { xB1 yB1 } if + xB2 yB2 xA2 yA2 ArmA 0 ne { xA1 yA1 } if + tx@Dict begin false Line end + /LPutVar [ xB1 yB1 xB2 yB2 xA2 yA2 xA1 yA1 ] cvx def + /LPutPos { LPutLines } def + /HPutPos { HPutLines } def + /VPutPos { VPutLines } def +} def +% +/NCDiag { + GetEdgeA GetEdgeB GetArmA GetArmB mark + ArmB 0 ne { xB1 yB1 } if + xB2 yB2 xA2 yA2 + ArmA 0 ne { xA1 yA1 } if + tx@Dict begin false Line end + /LPutVar [ xB1 yB1 xB2 yB2 xA2 yA2 xA1 yA1 ] cvx def + /LPutPos { LPutLines } def + /HPutPos { HPutLines } def + /VPutPos { VPutLines } def +} def +% +/NCDiagg { + GetEdgeA GetArmA + yB yA2 sub xB xA2 sub Atan 180 add /AngleB ED + GetEdgeB + mark + xB1 yB1 xA2 yA2 + ArmA 0 ne { xA1 yA1 } if + tx@Dict begin false Line end + /LPutVar [ xB1 yB1 xA2 yA2 xA1 yA1 ] cvx def + /LPutPos { LPutLines } def + /HPutPos { HPutLines } def + /VPutPos { VPutLines } def +} def +% +/NCLoop { + GetEdgeA GetEdgeB GetArmA GetArmB + /mtrx AngleA matrix rotate def + xA2 yA2 mtrx transform loopsize add /yA3 ED /xA3 ED + /xB3 xB2 yB2 mtrx transform pop def + xB3 yA3 mtrx itransform /yB3 ED /xB3 ED + xA3 yA3 mtrx itransform /yA3 ED /xA3 ED + mark ArmB 0 ne { xB1 yB1 } if + xB2 yB2 xB3 yB3 xA3 yA3 xA2 yA2 ArmA 0 ne { xA1 yA1 } if + tx@Dict begin false Line end + /LPutVar [ xB1 yB1 xB2 yB2 xB3 yB3 xA3 yA3 xA2 yA2 xA1 yA1 ] cvx def + /LPutPos { LPutLines } def + /HPutPos { HPutLines } def + /VPutPos { VPutLines } def +} def +% % DG/SR modification begin - May 9, 1997 - Patch 1 %/NCCircle { 0 0 NodesepA nodeA \tx@GetEdge pop xA sub 2 div dup 2 exp r %r mul sub abs sqrt atan 2 mul /a ED r AngleA 90 add PtoC yA add exch xA add %exch 2 copy /LPutVar [ 4 2 roll r AngleA ] cvx def /LPutPos { LPutVar t 360 %mul add dup 5 1 roll 90 sub \tx@PtoC 3 -1 roll add /Y ED add /X ED /NAngle ED -/NCCircle { NodeSepA 0 NodeA 0 GetEdge pop 2 div dup 2 exp r -r mul sub abs sqrt atan 2 mul /a ED r AngleA 90 add PtoC yA add exch xA add -exch 2 copy /LPutVar [ 4 2 roll r AngleA ] cvx def /LPutPos { LPutVar t 360 -mul add dup 5 1 roll 90 sub PtoC 3 -1 roll add /Y ED add /X ED /NAngle ED +% +/NCCircle { + NodeSepA 0 NodeA 0 GetEdge pop + 2 div dup 2 exp r r mul sub abs sqrt + atan 2 mul /a ED + r AngleA 90 add PtoC yA add exch xA add + exch 2 copy + /LPutVar [ 4 2 roll r AngleA ] cvx def + /LPutPos { + LPutVar t 360 mul add dup 5 1 roll 90 sub PtoC + 3 -1 roll add + /Y ED add /X ED /NAngle ED % DG/SR modification end -} def /HPutPos { LPutPos } def /VPutPos { LPutPos } def r AngleA 90 sub a add -AngleA 270 add a sub tx@Dict begin /angleB ED /angleA ED /r ED /c 57.2957 r -Div def /y ED /x ED } def + } def + /HPutPos { LPutPos } def + /VPutPos { LPutPos } def + r AngleA 90 sub a add AngleA 270 add a sub + tx@Dict begin + /angleB ED /angleA ED /r ED + /c 57.2957 r Div def + /y ED /x ED +} def +% /NCBox { /d ED /h ED /AngleB yB yA sub xB xA sub Atan def /AngleA AngleB 180 add def GetEdgeA GetEdgeB /dx d AngleB sin mul def /dy d AngleB cos mul neg def /hx h AngleB sin mul neg def /hy h AngleB cos mul def @@ -250,19 +388,46 @@ w sub yB } { xB yB w sub xB yB w add } ifelse xA1 yA1 ] cvx def /LPutPos { pop pop pop pop 4 2 roll } ifelse } def /VPutPos { VPutPos@ VPutLine } def /HPutPos { VPutPos@ HPutLine } def mark LPutVar tx@Dict begin /ArrowA { moveto } def /ArrowB { } def false Line closepath end } def - -/LPutCoor { NAngle tx@Dict begin /NAngle ED end gsave CM STV CP Y sub neg -exch X sub neg exch moveto setmatrix CP grestore } def - -/LPut { tx@NodeDict /LPutPos known { LPutPos } { CP /Y ED /X ED /NAngle 0 -def } ifelse LPutCoor } def -/HPutAdjust { Sin Cos mul 0 eq { 0 } { d Cos mul Sin div flag not { neg } -if h Cos mul Sin div flag { neg } if 2 copy gt { pop } { exch pop } -ifelse } ifelse s add flag { r add neg } { l add } ifelse X add /X ED } -def -/VPutAdjust { Sin Cos mul 0 eq { 0 } { l Sin mul Cos div flag { neg } if -r Sin mul Cos div flag not { neg } if 2 copy gt { pop } { exch pop } -ifelse } ifelse s add flag { d add } { h add neg } ifelse Y add /Y ED } -def +% +/LPutCoor { + NAngle + tx@Dict begin /NAngle ED end + gsave + CM STV + CP Y sub neg exch X sub neg exch moveto + setmatrix CP + grestore +} def +% +/LPut { + tx@NodeDict /LPutPos known + { LPutPos } { CP /Y ED /X ED /NAngle 0 def } ifelse + LPutCoor +} def +% +/HPutAdjust { + Sin Cos mul 0 eq + { 0 } + { d Cos mul Sin div flag not { neg } if + h Cos mul Sin div flag { neg } if + 2 copy gt { pop } { exch pop } ifelse + } ifelse + s add flag { r add neg }{ l add } ifelse + X add /X ED +} def +% +/VPutAdjust { + Sin Cos mul + 0 eq + { 0 } + { l Sin mul Cos div flag { neg } if + r Sin mul Cos div flag not { neg } if + 2 copy gt { pop } { exch pop } ifelse + } ifelse + s add flag { d add } { h add neg } ifelse + Y add /Y ED +} def +% end +% % END pst-node.pro diff --git a/Master/texmf-dist/dvips/pstricks/pstricks.pro b/Master/texmf-dist/dvips/pstricks/pstricks.pro index 7701af23def..fa156bb7488 100644 --- a/Master/texmf-dist/dvips/pstricks/pstricks.pro +++ b/Master/texmf-dist/dvips/pstricks/pstricks.pro @@ -1,7 +1,7 @@ -% $Id: pstricks.pro 34 2008-06-25 17:20:01Z herbert $ +% $Id: pstricks.pro 90 2009-01-30 10:58:51Z herbert $ % %% PostScript prologue for pstricks.tex. -%% Version 1.05, 2008/06/25 +%% Version 1.06, 2009/01/30 %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives @@ -53,10 +53,12 @@ tx@Dict begin /TwoPi 6.28318530718 def /Euler 2.71828182846 def %/e Euler bind def +% /RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees /DegtoRad { Pi mul 180 div } bind def % viceversa %----------------- hv end--------------------------- /PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def +% /PathLength { flattenpath /z 0 def { /y1 ED /x1 ED /y2 y1 def /x2 x1 def } @@ -314,13 +316,26 @@ tx@Dict begin %div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 %d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx %setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx +% +/Triangle { + /mtrx CM def + translate + rotate /h ED 2 div /w ED + dup CLW mul /d ED + /h h d w h Atan sin Div sub def + /w w d h w Atan 2 div dup cos exch sin Div mul sub def + mark + 0 d w neg d 0 h w d 0 d + /ArrowA { moveto } def + /ArrowB { } def + false + Line + closepath + mtrx % DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) % setmatrix } def -setmatrix pop } def + setmatrix pop +} def % DG/SR modification end % /CCA { @@ -389,21 +404,53 @@ setmatrix pop } def % /SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def /ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def +/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } def +% +/FontDot { + DS 2 mul dup + matrix scale matrix concatmatrix exch matrix + rotate matrix concatmatrix exch + findfont exch makefont setfont +} def +% +/Rect { + x1 y1 y2 add 2 div moveto + x1 y2 lineto + x2 y2 lineto + x2 y1 lineto + x1 y1 lineto + closepath +} def +% +/OvalFrame { + x1 x2 eq y1 y2 eq or + { pop pop x1 y1 moveto x2 y2 L } + { y1 y2 sub abs x1 x2 sub abs 2 copy gt + { exch pop } { pop } ifelse + 2 div exch { dup 3 1 roll mul exch } if + 2 copy lt { pop } { exch pop } ifelse + /b ED + x1 y1 y2 add 2 div moveto + x1 y2 x2 y2 b arcto + x2 y2 x2 y1 b arcto + x2 y1 x1 y1 b arcto + x1 y1 x1 y2 b arcto + 16 { pop } repeat + closepath + } ifelse +} def +% +/Frame { + CLW mul /a ED + 3 -1 roll + 2 copy gt { exch } if + a sub /y2 ED + a add /y1 ED + 2 copy gt { exch } if + a sub /x2 ED + a add /x1 ED + 1 index 0 eq { pop pop Rect } { OvalFrame } ifelse +} def % /BezierNArray { /f ED @@ -640,27 +687,57 @@ dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifel a Rot /RAngle [ RAngle dup a add ] cvx def } def % -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def +/RotEnd { + /TMatrix [ TMatrix setmatrix ] cvx def + /RAngle [ RAngle pop ] cvx def +} def % /PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def /PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def /PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def +% +/Uput { + /a ED + add 2 div /h ED 2 + div /w ED + /s a sin def + /c a cos def + /b s abs c abs 2 copy gt dup + /q ED + { pop } { exch pop } ifelse def + /w1 c b div w mul def + /h1 s b div h mul def + q { w1 abs w sub dup c mul abs }{ h1 abs h sub dup s mul abs } ifelse +} def +% +/UUput { + /z ED + abs /y ED + /x ED + q { x s div c mul abs y gt }{ x c div s mul abs y gt } ifelse + { x x mul y y mul sub z z mul add sqrt z add } + { q { x s div } { x c div } ifelse abs + } ifelse + a PtoC + h1 add exch + w1 add exch +} def +% +/BeginOL { + dup (all) eq exch TheOL eq or + { IfVisible not { Visible /IfVisible true def } if } + { IfVisible { Invisible /IfVisible false def } if } ifelse +} def +% +/InitOL { + /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def + /Visible { CP OLUnit idtransform T moveto } def + /Invisible { CP OLUnit neg exch neg exch idtransform T moveto } def + /BOL { BeginOL } def + /IfVisible true def +} def +% end %-----------------------------------------------------------------------------% - +% % END pstricks.pro |