From adbae1a3a896ca1707aee0886f80efe6dd385dbe Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Fri, 23 Jul 2021 20:08:01 +0000
Subject: pst-arrow (23jul21)

git-svn-id: svn://tug.org/texlive/trunk@60024 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/tex/generic/pst-arrow/pst-arrow.tex | 75 ++++++++++++++++++++--
 1 file changed, 69 insertions(+), 6 deletions(-)

(limited to 'Master/texmf-dist/tex/generic/pst-arrow/pst-arrow.tex')

diff --git a/Master/texmf-dist/tex/generic/pst-arrow/pst-arrow.tex b/Master/texmf-dist/tex/generic/pst-arrow/pst-arrow.tex
index 7e14839b368..f236aedfb6a 100644
--- a/Master/texmf-dist/tex/generic/pst-arrow/pst-arrow.tex
+++ b/Master/texmf-dist/tex/generic/pst-arrow/pst-arrow.tex
@@ -1,4 +1,4 @@
-%% $Id: pst-arrow.tex 328 2016-09-01 19:00:31Z herbert $
+%% $Id: pst-arrow.tex 134 2021-07-23 06:33:54Z herbert $
 %%
 %% This is file `pst-arrow.tex',
 %%
@@ -22,12 +22,16 @@
 \ifx\PSTricksLoaded\endinput\else\input pstricks \fi
 \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi
 %
-\def\fileversion{0.01}
-\def\filedate{2016/09/01}
+\def\fileversion{0.02}
+\def\filedate{2021/07/21}
 \message{`pst-arrow' v\fileversion, \filedate\space (dr,hv)}
 %
 \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
 \pst@addfams{pst-arrow}
+%
+\define@key[psset]{pst-arrow}{tipcolor}[black]{\pst@getcolor{#1}\psk@tipcolor}
+\psset[pst-arrow]{tipcolor=black}
+
 %
 \def\psBigArrow{\pst@object{psBigArrow}}
 \def\psBigArrow@i(#1)(#2){%
@@ -105,18 +109,25 @@
     x y L                % point #3
     { closepath gsave fill grestore } if    % if filled : close and fill
     \@nameuse{psls@\psarrowlinestyle}
+    \pst@usecolor\psk@tipcolor    
     stroke                % draw line
     0 t { y 2 mul } { 0 } ifelse moveto>    % if outside : twice longer line
 
 % VeeArrow : filled?   outside?   (total) angle   (projected) length   (arrow) line width
 
+\@namedef{psas@|}{\pst@usecolor\psk@tipcolor \psk@tbarsize \tx@Tbar}
+
 \@namedef{psas@v}{%
+  \pst@usecolor\psk@tipcolor 
   false false \psk@veearrowangle \psk@veearrowlength \psk@veearrowlinewidth \tx@VeeArrow}
 \@namedef{psas@V}{%
+  \pst@usecolor\psk@tipcolor 
   false true \psk@veearrowangle \psk@veearrowlength \psk@veearrowlinewidth \tx@VeeArrow}
 \@namedef{psas@f}{%
+  \pst@usecolor\psk@tipcolor 
   true false \psk@filledveearrowangle \psk@filledveearrowlength \psk@filledveearrowlinewidth \tx@VeeArrow}
 \@namedef{psas@F}{%
+  \pst@usecolor\psk@tipcolor 
   true true \psk@filledveearrowangle \psk@filledveearrowlength \psk@filledveearrowlinewidth \tx@VeeArrow}
 
 % And An another arrowhead
@@ -138,11 +149,57 @@
     y neg y moveto            % point #1
     y y neg L                % point #2
     \@nameuse{psls@\psarrowlinestyle}
+    \pst@usecolor\psk@tipcolor
     stroke                % draw line
     0 0 moveto>                % origin
 
-\@namedef{psas@t}{ false \psk@tickarrowlength \psk@tickarrowlinewidth \tx@TickArrow }
-\@namedef{psas@T}{ true \psk@tickarrowlength \psk@tickarrowlinewidth \tx@TickArrow }
+
+\@namedef{psas@t}{ \pst@usecolor\psk@tipcolor\space false \psk@tickarrowlength \psk@tickarrowlinewidth \tx@TickArrow }
+\@namedef{psas@T}{ \pst@usecolor\psk@tipcolor\space true \psk@tickarrowlength \psk@tickarrowlinewidth \tx@TickArrow }
+
+\pst@def{ArrowD}< % the sides are drawn as curves (hv 20071211)
+  CLW mul add dup 
+  2 div /w ED 
+  mul dup /h ED 
+  mul /Inset ED 
+  { 0 h T 1 -1 scale } if % changes the direction
+% we use y=w/h^2 * x^2 as equation for the control points
+% for the coordinates the arrow is seen from top to bottom
+% the bottom (tip) is (0;0)
+  w neg h moveto % lower left of >
+  w 9 div 4 mul neg h 3 div 2 mul
+  w 9 div neg       h 3 div  
+  0 0 curveto    % tip of >
+  w 9 div        h 3 div  
+  w 9 div 4 mul  h 3 div 2 mul
+  w h curveto % upper left of >
+  w neg Inset neg rlineto % move to x=0 and inset
+  gsave 
+  \pst@usecolor\psk@tipcolor 
+  fill grestore >
+%
+\pst@def{ArrowT}< % like tikz
+  CLW mul add dup 
+  2 div /w ED 
+  mul dup /h ED 
+  mul /Inset ED 
+  { 0 h T 1 -1 scale } if % changes the direction
+  w 2 mul /w exch def
+  w neg h moveto % lower left of >
+  w 9 div 4 mul neg h 3 div 2 mul
+  w 9 div neg       h 3 div  
+  0 0 curveto    % tip of >
+  w 9 div        h 3 div  
+  w 9 div 4 mul  h 3 div 2 mul
+  w h curveto % upper left of >
+%  w neg Inset neg rlineto % move to x=0 and inset
+%  CLW SLW
+%  1 0 0 setrgbcolor
+  2 setlinejoin
+  \pst@usecolor\psk@tipcolor
+  stroke
+  0 0 moveto >
+%
 %
 % HookLeft/RightArrow
 \newdimen\pshooklength
@@ -154,6 +211,7 @@
 \edef\pst@arrowtable{\pst@arrowtable,H-H,h-h} % add new arrow
 \def\tx@RHook{RHook }         % PostScript name
 \def\tx@Rhook{Rhook }         % PostScript name
+
 \@namedef{psas@H}{%
   /RHook {
     /x ED                     % hook width
@@ -165,6 +223,7 @@
     stroke 
     0 y moveto                % define current point
   } def
+  \pst@usecolor\psk@tipcolor
   \pst@number\pshooklength
   \pst@number\pshookwidth
   \tx@RHook 
@@ -178,6 +237,7 @@
     /a ED  
     w neg h abs moveto 0 0 L 
     gsave 
+    \pst@usecolor\psk@tipcolor    
     stroke grestore 
   } def
   0 \psk@arrowlength \psk@arrowsize \tx@Rhook 
@@ -194,12 +254,15 @@
     /a ED { 0 h T 1 -1 scale } if
     gsave
     \ifpsArrowFill\else\pst@number\pslinewidth \pst@arrowscale\space div SLW \fi
+    \pst@usecolor\psk@tipcolor    
     w neg h moveto
     0 0 L w h L w neg a neg rlineto
     \ifpsArrowFill gsave 
        \tx@setStrokeTransparency
        fill  
-       grestore \else gsave closepath stroke grestore \fi
+       grestore \else gsave closepath 
+       \pst@usecolor\psk@tipcolor
+       stroke grestore \fi
     grestore
     0 h a sub moveto
 }>
-- 
cgit v1.2.3

