summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pst-poly
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-08-29 22:30:07 +0000
committerKarl Berry <karl@freefriends.org>2014-08-29 22:30:07 +0000
commite2faa35730b6d72f3cb3d22ddac8b4171a482bc3 (patch)
tree9f2619a14df1ea84bc2db5613e4a9c614607c43b /Master/texmf-dist/tex/generic/pst-poly
parent9c1f0088b435b2e8aa6507fd08003dc57e66cf9e (diff)
pst-poly (29aug14)
git-svn-id: svn://tug.org/texlive/trunk@35062 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pst-poly')
-rw-r--r--Master/texmf-dist/tex/generic/pst-poly/pst-poly.tex64
1 files changed, 33 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-poly/pst-poly.tex b/Master/texmf-dist/tex/generic/pst-poly/pst-poly.tex
index 9720ab84087..ab5afcca650 100644
--- a/Master/texmf-dist/tex/generic/pst-poly/pst-poly.tex
+++ b/Master/texmf-dist/tex/generic/pst-poly/pst-poly.tex
@@ -1,4 +1,4 @@
-%% $Id: pst-poly.tex 187 2009-12-20 12:44:24Z herbert $
+%% $Id: pst-poly.tex 332 2010-05-28 18:45:07Z herbert $
%%
%% This is file `pst-poly.tex',
%%
@@ -8,8 +8,6 @@
%% Denis Girou (CNRS/IDRIS - France) <Denis.Girou@idris.fr>
%% Herbert Voss <hvoss@tug.org>
%%
-%% december 20, 2009
-%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
%% in directory macros/latex/base/lppl.txt.
@@ -26,8 +24,8 @@
\ifx\MultidoLoaded\endinput\else \input multido.tex\fi
\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi
%
-\def\fileversion{1.61}
-\def\filedate{2009/12/20}
+\def\fileversion{1.63}
+\def\filedate{2014/08/28}
\message{`PST-Polygon' v\fileversion, \filedate\space (DG/hv)}
%
\edef\PstAtCode{\the\catcode`\@}
@@ -62,18 +60,18 @@
%
\def\PstPolygon{\pst@object{PstPolygon}}
\def\PstPolygon@i{{%
- \use@par%
+ \use@par
\if@star\solid@star\fi
\ifodd\PstPoly@Offset\def\PstPoly@Decimal{.5}\else\def\PstPoly@Decimal{}\fi
\ifPst@PstPicture\pspicture(-1,-1)(1,1)\fi
\rput{\PstPoly@Rotation}(0,0){%
- \degrees[\PstPoly@NbSides]
+ \degrees[\PstPoly@NbSides]%
\NormalCoor
- \pssetlength{\PstPoly@IntermediatePointDim}{\PstPoly@IntermediatePoint}
+ \pssetlength{\PstPoly@IntermediatePointDim}{\PstPoly@IntermediatePoint}%
\SpecialCoor
\ifx\PstPoly@Name\@empty
\else
- \pnode(0,0){\PstPoly@Name 0}
+ \pnode(0,0){\PstPoly@Name 0}%
\ifnum\psxunit=\psyunit
\def\PstPoly@Node{\pnode(1;\i)}%
\else
@@ -82,27 +80,27 @@
\i\space 360 \PstPoly@NbSides\space div mul sin)}%
\fi
\multido{\i=0+1}{\PstPoly@NbSides}{%
- \PstPoly@Node{\PstPoly@Name\the\multidocount}}
+ \PstPoly@Node{\PstPoly@Name\the\multidocount}}%
\fi
- \pscustom{%
+ \pscustom{
\ifPst@PolyEpicycloid
\pst@cnta=\PstPoly@NbSides
\divide\pst@cnta\tw@
\multido{\i=0+1}{\PstPoly@NbSides}{%
\moveto(1;\i)
\lineto(1;\the\pst@cnta)
- \advance\pst@cnta\PstPoly@Offset}
+ \advance\pst@cnta\PstPoly@Offset}%
\else
\ifnum\psxunit=\psyunit \moveto(1,0)\else\moveto(! 1 0)\fi
\ifx\PstPoly@IntermediatePoint\@empty
\ifnum\psxunit=\psyunit
\def\PstPoly@Junction{\lineto(1;\i)}%
\else
- \def\PstPoly@Junction{\lineto%
+ \def\PstPoly@Junction{\lineto
(! \i\space 360 \PstPoly@NbSides\space div mul cos
\i\space 360 \PstPoly@NbSides\space div mul sin)}%
\fi
- \multido{\i=\PstPoly@Offset+\PstPoly@Offset}{\PstPoly@NbSides}{\PstPoly@Junction}
+ \multido{\i=\PstPoly@Offset+\PstPoly@Offset}{\PstPoly@NbSides}{\PstPoly@Junction}%
\else
\ifPst@PolyCurves\let\PstPoly@JunctionType\pscurve\else\let\PstPoly@JunctionType\psline\fi
\ifnum\psxunit=\psyunit
@@ -120,12 +118,12 @@
\divide\pst@cnta\tw@
\multido{\i=\PstPoly@Offset+\PstPoly@Offset}{\PstPoly@NbSides}{%
\PstPoly@Junction
- \advance\pst@cnta\PstPoly@Offset}
+ \advance\pst@cnta\PstPoly@Offset}%
\fi
- \fi}
+ \fi}%
\ifx\PstPolygonNode\@undefined
- \else\multido{\INode=\z@+\PstPoly@Offset}{\PstPoly@NbSides}{\PstPolygonNode}\fi}
- \ifPst@PstPicture\endpspicture\fi%
+ \else\multido{\INode=\z@+\PstPoly@Offset}{\PstPoly@NbSides}{\PstPolygonNode}\fi}%
+ \ifPst@PstPicture\endpspicture\fi
}}
%
\def\PstTriangle{\pst@object{PstTriangle}}
@@ -145,7 +143,7 @@
\def\PstPentagon{\pst@object{PstPentagon}}
\def\PstPentagon@i{{%
\addto@par{PolyNbSides=5,PolyRotation=18}% For pentagon (360/5/4)
- \use@par%
+ \use@par
\if@star\solid@star\fi
\PstPolygon}}
%
@@ -205,13 +203,15 @@
\if@star\solid@star\fi
\PstPolygon}}
%
-\newdimen\pst@dimm
-\newdimen\pst@dimn
-\newdimen\pst@dimo
-\newdimen\pst@dimp
+% Aspecial version for pst-poly
+\def\pst@polypyth#1#2#3{\ifdim#1>#2\pst@@polypyth#1#2#3\else\pst@@polypyth#2#1#3\fi}
+\def\pst@@polypyth#1#2#3{%
+ \ifdim4#1>9#2 #3=#1\advance#3 .2122#2%
+ \else#3=.8384#1\advance#3 .5758#2\fi}
+%
\def\pspolygonbox{\pst@object{pspolygonbox}}% voss 2004-11-20
\def\pspolygonbox@i{\pst@makebox\pspolygonbox@ii}
-\def\pspolygonbox@ii{{%
+\def\pspolygonbox@ii{%
\begingroup%
\addbefore@par{boxsep=true}%
\pst@useboxpar%
@@ -222,11 +222,14 @@
\fi%
\advance\pst@dima by \psframesep%
\pst@dimc=\wd\pst@hbox%
- \pst@dimp=\pst@dimc\advance\pst@dimp by 2\pst@dima%
- \pst@dimb=\dp\pst@hbox\pst@dimo=\pst@dimb%
- \pst@dimd=\ht\pst@hbox\advance\pst@dimo by \pst@dimd% totalheight
- \pst@pyth\pst@dimp\pst@dimo\pst@dimm%
- \divide\pst@dimm by 2% Radius
+ \pst@dimp=\pst@dimc
+ \advance\pst@dimp by 2\pst@dima
+ \pst@dimb=\dp\pst@hbox
+ \pst@dimo=\pst@dimb%
+ \pst@dimd=\ht\pst@hbox
+ \advance\pst@dimo by \pst@dimd% totalheight
+ \pst@polypyth\pst@dimp\pst@dimo\pst@dimm
+ \global\divide\pst@dimm by 2% Radius
\setbox\pst@hbox=\hbox{%
\ifpsboxsep\kern\pst@dima\fi% left side
\begin@ClosedObj%
@@ -243,7 +246,6 @@
\pst@cp
\tx@polygonB
\psline@iii
-%% \tx@Line
\tx@Polygon
}%
\def\pst@linetype{1}%
@@ -262,7 +264,7 @@
\leavevmode%
\box\pst@hbox%
\endgroup%
-}\ignorespaces}
+ \ignorespaces}
%
\pst@def{polygonB}<{%
/x1 framesep neg def