[pstricks] hook and arrowinset

Herbert Voss Herbert.Voss at FU-Berlin.DE
Tue Dec 11 12:05:01 CET 2007


Bernd Sellentin schrieb:
> Hello,
> I like to have the hook to react the same way as a normal arrow does, 
> especially that the option arrowinset is working.

hope, it helps

Herbert

\documentclass[11pt]{minimal}
\usepackage{pstricks-add}
\makeatletter
\edef\pst at arrowtable{\pst at arrowtable,D-D}
\@namedef{psas at D}{
   false \psk at arrowinset \psk at arrowlength \psk at arrowsize
   CLW mul add dup
   2 div /w ED
   mul dup /h ED
   mul /Inset ED
   { 0 h T 1 -1 scale } if
   0 h Inset sub moveto
   w neg h L 0 0 L
   gsave fill grestore }
\makeatother

\begin{document}

\begin{pspicture}(0,0)(1,1)
\psline[arrowsize=8pt,arrowinset=0,arrowlength=2]{-D}(0cm,0.33)(1,0.33)
\psline[arrowsize=8pt,arrowinset=0,arrowlength=2]{->}(0cm,0.66)(1,0.66)
\end{pspicture}

\begin{pspicture}(0,0)(1,1)
\psline[arrowsize=8pt,arrowinset=0.7,arrowlength=2]{-D}(0cm,0.33)(1,0.33)
\psline[arrowsize=8pt,arrowinset=0.7,arrowlength=2]{->}(0cm,0.66)(1,0.66)
\end{pspicture}

\end{document}





More information about the PSTricks mailing list