summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/dvips/pstricks
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-03-12 22:32:50 +0000
committerKarl Berry <karl@freefriends.org>2014-03-12 22:32:50 +0000
commit44df6d09616942cb3a83276fba2978bc9cdee561 (patch)
tree25d8704f6242db91513074383de6c56a9bcb10fe /Master/texmf-dist/dvips/pstricks
parentb2f136b4ef89ad57771cb79327eb0745a7c93bd1 (diff)
pstricks (12mar14)
git-svn-id: svn://tug.org/texlive/trunk@33160 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/dvips/pstricks')
-rw-r--r--Master/texmf-dist/dvips/pstricks/pstricks.pro99
1 files changed, 97 insertions, 2 deletions
diff --git a/Master/texmf-dist/dvips/pstricks/pstricks.pro b/Master/texmf-dist/dvips/pstricks/pstricks.pro
index 0a60f8e4460..1349dc92d3e 100644
--- a/Master/texmf-dist/dvips/pstricks/pstricks.pro
+++ b/Master/texmf-dist/dvips/pstricks/pstricks.pro
@@ -1,7 +1,7 @@
-% $Id: pstricks.pro 856 2013-12-09 10:34:40Z herbert $
+% $Id: pstricks.pro 891 2014-02-03 10:05:33Z herbert $
%
%% PostScript prologue for pstricks.tex.
-%% Version 1.21, 2013/11/28
+%% Version 1.22, 2014/02/20
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
@@ -30,6 +30,7 @@ tx@Dict begin
/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known
/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter)
/Div { dup 0 eq { pop } { div } ifelse } def % control the division
+/Log { dup 1e-20 lt { pop -1e30 }{ log } ifelse } def % control the log
/tan { dup cos abs 1.e-10 lt
{ pop 1.e10 } % return 1.e10 as infinit
{ dup sin exch cos div } ifelse % default sin/cos
@@ -731,6 +732,100 @@ gsave
CurvePath
} def
%
+/CalcBezierSpline {% Christoph Bersch
+ 10 dict begin
+ /getX { Points exch 2 mul get } def
+ /getY { Points exch 2 mul 1 add get } def
+ /n Points length 1 sub 2 idiv def
+ /GetFirstControlPoints {
+ /x n array def
+ /tmp n array def
+ /b 2 def
+ x 0 rhs 0 get b div put
+ 1 1 n 1 sub {
+ /i exch def
+ tmp i 1 b div dup 4 1 roll put
+ i n 1 sub lt { 4 }{ 3.5 } ifelse exch sub /b exch def
+ x i rhs i get x i 1 sub get sub b div put
+ } for
+ 1 1 n 1 sub {
+ n exch sub
+ dup dup x exch 1 sub 2 copy 6 2 roll
+ get 3 1 roll tmp exch get
+ exch x exch get mul sub
+ put
+ } for
+ x
+ } def
+ %
+ n 1 eq {
+ 0 getX 2 mul 1 getX add 3 div
+ 0 getY 2 mul 1 getY add 3 div
+ exch dup 3 1 roll 2 mul 0 getX sub
+ exch dup 3 1 roll 2 mul 0 getY sub
+ [ 0 getX 0 getY 7 3 roll 1 getX 1 getY ] /outPoints exch def
+ } {
+ /outPoints 6 n mul 2 add array def
+ 0 1 n {
+ dup dup 6 mul dup 1 add
+ outPoints exch 5 -1 roll getY put
+ outPoints exch 3 -1 roll getX put
+ } for
+ /rhs n array def
+ 1 1 n 2 sub {
+ rhs exch dup dup getX 4 mul exch 1 add getX 2 mul add put
+ } for
+ rhs 0 0 getX 1 getX 2 mul add put
+ rhs n 1 sub dup getX 8 mul n getX add 2 div put
+ GetFirstControlPoints
+ 1 1 n 2 sub {
+ rhs exch dup dup getY 4 mul exch 1 add getY 2 mul add put
+ } for
+ rhs 0 0 getY 1 getY 2 mul add put
+ rhs n 1 sub dup getY 8 mul n getY add 2 div put
+ GetFirstControlPoints
+ 0 1 n 1 sub {
+ /i exch def
+ 2 copy
+ i get outPoints 6 i mul 3 add 3 -1 roll put
+ i get outPoints 6 i mul 2 add 3 -1 roll put
+ 2 copy
+ i n 1 sub lt {
+ i 1 add get i 1 add getY 2 mul exch sub outPoints 6 i mul 5 add 3 -1 roll put
+ i 1 add get i 1 add getX 2 mul exch sub outPoints 6 i mul 4 add 3 -1 roll put
+ }{
+ n 1 sub get n getY add 2 div outPoints 6 n 1 sub mul 5 add 3 -1 roll put
+ n 1 sub get n getX add 2 div outPoints 6 n 1 sub mul 4 add 3 -1 roll put
+ } ifelse
+ } for
+ pop pop
+ } ifelse
+ outPoints
+ end
+} def
+/Spline {
+ /showpoints ED
+ counttomark 2 div dup cvi /n ED
+ n eq not { exch pop } if
+ ] /Points ED
+ n 1 gt {
+ CalcBezierSpline
+ mark exch aload pop
+ ArrowA
+ n 2 sub {
+ 6 2 roll 4 2 roll curveto
+ } repeat
+ 6 2 roll 4 2 roll ArrowB curveto
+ } if
+} def
+/OpenSymbolSpline {
+ Spline
+ 0.1 setflat
+ /Shift Symbol stringwidth pop 2 div def
+ CurvePath
+} 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