summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-08-21 21:40:48 +0000
committerKarl Berry <karl@freefriends.org>2016-08-21 21:40:48 +0000
commit61f034941d65cf39d29d8b935d96af5bd35d72b5 (patch)
tree624754fa8e4b462f03d7502ee4cca44c0e1c889f /Master/texmf-dist/tex
parent9c9dda62402e3156b09391a12663a213ae391ff1 (diff)
pst-bezier (21aug16)
git-svn-id: svn://tug.org/texlive/trunk@41899 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/generic/pst-bezier/pst-bezier.tex92
-rw-r--r--Master/texmf-dist/tex/latex/pst-bezier/pst-bezier.sty11
2 files changed, 93 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-bezier/pst-bezier.tex b/Master/texmf-dist/tex/generic/pst-bezier/pst-bezier.tex
index a13a8fb239c..36659287d1f 100644
--- a/Master/texmf-dist/tex/generic/pst-bezier/pst-bezier.tex
+++ b/Master/texmf-dist/tex/generic/pst-bezier/pst-bezier.tex
@@ -6,8 +6,8 @@
%%
%% Package `pst-bezier.tex'
%%
-%% Tobias Nähring (www.tn-home.de)
-%% Herbert Voss <voss@PSTricks.de>
+%% Tobias Nähring (www.tn-home.de) (inactive)
+%% Herbert Voss <hvoss@tug.org>
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
@@ -20,12 +20,14 @@
\csname PSTbezierLoaded\endcsname
\let\PSTbezierLoaded\endinput
-\def\fileversion{0.01}
-\def\filedate{2009/01/29}
-\message{ v\fileversion, \filedate}
-
\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi
-\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi
+\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi
+\ifx\PSTplotLoaded\endinput\else \input pst-plot \fi
+\ifx\PSTnodesLoaded\endinput\else\input pst-node \fi
+
+\def\fileversion{0.02}
+\def\filedate{2016/08/19}
+\message{ v\fileversion, \filedate}
\edef\TheAtCode{\the\catcode`\@}\catcode`\@=11
@@ -329,6 +331,82 @@ t,\psbcurve@tension,%
T,\psbcurve@Tension,%
\relax,\psbcurve@end}%
}
+%
+\define@key[psset]{pst-bezier}{nPoints}{\def\psk@nPoints{#1 }}
+\define@boolkey[psset]{pst-bezier}[Pst@]{showPolygon}[true]{}
+\define@boolkey[psset]{pst-bezier}[Pst@]{autoTrace}[true]{}
+% valeurs par défaut
+% les coordonnées des points de contrôle P0= x0 y0, etc.
+%\psset[pst-RQBC]{P0=2 0,P1=2 2,P2=0 2,w=1 0.707 1,n=400,showPoints=true,showPolygon=false}
+\psset{nPoints=400,showPolygon=false,autoTrace=false}
+%
+\def\pst@get@w#1,#2,#3\@nil{%
+ \def\pst@@w{#1 #2 #3 }%
+ \def\psk@wZero{#1 }%
+ \def\psk@wUn{#2 }%
+ \def\psk@wDeux{#3 }}
+%
+\def\psRQBCmasse{\def\pst@par{}\pst@object{psRQBCmasse}}
+\def\psRQBCmasse@i(#1)(#2)(#3)#4{{%
+% \addbefore@par{showpoints=false}%
+ \begin@SpecialObj
+ \pst@get@w#4\@nil
+ \pst@getcoor{#1}\pst@tempA
+ \pst@getcoor{#2}\pst@tempB
+ \pst@getcoor{#3}\pst@tempC
+ \pst@cntm=\pscalculate{abs(\psk@wZero)<1e-6 ? 0 : 1}%
+ \pst@cntn=\pscalculate{abs(\psk@wUn)<1e-6 ? 0 : 2}%
+ \pst@cnto=\pscalculate{abs(\psk@wDeux)<1e-6 ? 0 : 4}%
+ \edef\ps@choix{\the\numexpr\pst@cntm+\pst@cntn+\pst@cnto}%
+% \typeout{>>pst-bezier: ps@choix=\ps@choix}%
+ \pstVerb{
+% \addto@pscode{
+ tx@Dict begin
+ /nB \psk@nPoints def
+ \pst@tempA \tx@UserCoor /yP0 exch def /xP0 exch def
+ \pst@tempB \tx@UserCoor /yP1 exch def /xP1 exch def
+ \pst@tempC \tx@UserCoor /yP2 exch def /xP2 exch def
+ \pst@@w /w2 exch def /w1 exch def /w0 exch def
+ /choix \ps@choix\space def
+ tx@RQBCmasse
+ end
+ } % fin pstVerb
+ \pnodes(#1){P0}(#2){P1}(#3){P2}
+ \pnode(!P0P1){P0P1}
+ %\pnode(!P1P0){P1P0}
+ \pnode(!P1P2){P1P2}
+ \pnode(!P0P2){P0P2}
+ \pslistplot{RQBCmasse1}\pslistplot[showpoints=false]{RQBCmasse2}%
+ \ifPst@autoTrace
+ \ifcase\ps@choix
+ \or %1
+ \psline[linestyle=dashed,linecolor=black,arrowinset=0.1,arrowsize=0.2]{->}(#1)(P0P1)
+ \psline[linestyle=dashed,linecolor=green,arrowinset=0.1,arrowsize=0.2]{->}(#1)(P0P2)
+ %\psline[linestyle=dashed,linecolor=magenta,arrowinset=0.1,arrowsize=0.2]{->}(P1)
+ \psdots(#1)%(P1)(P2)
+ \or %2
+ \psline[linestyle=dashed,linecolor=black,arrowinset=0.1,arrowsize=0.2]{->}(#2)(P0P1)
+ \psline[linestyle=dashed,linecolor=green,arrowinset=0.1,arrowsize=0.2]{->}(#2)(P1P2)
+ %\psline[linestyle=dashed,linecolor=magenta,arrowinset=0.1,arrowsize=0.2]{->}(P1)
+ \psdots(#2)%(P1)(P2)
+ \or %3
+ \or %4
+ \psline[linestyle=dashed,linecolor=black,arrowinset=0.1,arrowsize=0.2]{->}(#3)(P1P2)
+ \psline[linestyle=dashed,linecolor=green,arrowinset=0.1,arrowsize=0.2]{->}(#3)(P0P2)
+ %\psline[linestyle=dashed,linecolor=magenta,arrowinset=0.1,arrowsize=0.2]{->}(P1)
+ \psdots(#3)%(P1)(P2)
+ \or % 5
+ \psline[linestyle=dashed,linecolor=black,arrowinset=0.1,arrowsize=0.2]{->}(#1)(P0P1)
+ \psline[linestyle=dashed,linecolor=green,arrowinset=0.1,arrowsize=0.2]{->}(#3)(P1P2)
+ \psline[linestyle=dashed,linecolor=magenta,arrowinset=0.1,arrowsize=0.2]{->}(#2)
+ \psdots(#1)(#2)(#3)
+ \or %6
+ \or %7
+ \psline(#1)(#2)(#3)\psdots(#1)(#2)(#3)
+ \fi
+ \fi
+ \end@SpecialObj}\ignorespaces}
+
\catcode`\@=\TheAtCode\relax
\endinput
diff --git a/Master/texmf-dist/tex/latex/pst-bezier/pst-bezier.sty b/Master/texmf-dist/tex/latex/pst-bezier/pst-bezier.sty
index b92dfac4721..7eac6b24ae7 100644
--- a/Master/texmf-dist/tex/latex/pst-bezier/pst-bezier.sty
+++ b/Master/texmf-dist/tex/latex/pst-bezier/pst-bezier.sty
@@ -1,13 +1,18 @@
-%% $Id: pst-bezier.sty 86 2009-01-29 10:34:00Z herbert $
+%% $Id: pst-bezier.sty 321 2016-08-20 07:45:01Z herbert $
%
\RequirePackage{pstricks}
-\ProvidesPackage{pst-bezier}[2009/01/29 v. 0.01 package wrapper for
+\RequirePackage{expl3}
+\ExplSyntaxOn
+ \cs_new_eq:NN \pscalculate \fp_eval:n
+\ExplSyntaxOff
+%
+\ProvidesPackage{pst-bezier}[2016/08/19 v. 0.02 package wrapper for
pst-bezier.tex (hv)]
\input{pst-bezier.tex}
\ProvidesFile{pst-bezier.tex}
[\filedate\space v\fileversion\space `PST-bezier' (tn,hv)]
\IfFileExists{pst-bezier.pro}{%
\ProvidesFile{pst-bezier.pro}
- [2009/01/29 v. 0.01, PostScript prologue file (tn,hv)]
+ [2016/08/19 v. 0.02, PostScript prologue file (tn,hv)]
\@addtofilelist{pst-bezier.pro}}{}%
\endinput