[pstricks] Grad or slpe in double line or think line
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Thu Feb 16 16:41:34 CET 2012
Am 16.02.2012 14:58, schrieb Arne Hallam:
> Is there a way to create a filled arrow where the fill is a gradient.
> What I would like is the arrow to show progression from the left to the
> right.
>
> In the following I would like the arrows to show a gradient.
just a quick ugly hack:
\documentclass{article}
\usepackage{pst-node,pst-grad}
\makeatletter
\def\ncLine{\pst at object{ncLine}}
\def\ncLine at i{\check at arrow{\ncLine at ii}}
\def\ncLine at ii#1#2{\nc at object{Open}{#1}{#2}{.5}{ \tx at ncLine }}
\pst at def{ncLine}<
NCCoor
tx at Dict begin
/YA ED /XA ED /YB ED /XB ED
XB XA sub /Length ED
XA YA moveto
CLW 8 mul dup rlineto
0 CLW -4 mul rlineto
Length CLW 16 mul sub 0 rlineto
0 CLW 4 mul rlineto
CLW 8 mul dup neg rlineto
CLW 8 mul neg dup rlineto
0 CLW 4 mul rlineto
Length CLW 16 mul sub neg 0 rlineto
0 CLW 4 mul neg rlineto
closepath
end
>
\makeatother
\begin{document}
\begin{psmatrix}[mcol=l,mnode=r, colsep=1.1cm,rowsep=10pt]
& Poor & Fair & Good & \\
Self-centered &~& && Mindful of other people \\
Lazy &~& && Diligent \\
Not thankful &~ & && Full of thanks \\
Mind not focused &~ & && Mind focused \\
General, not specific &~& && Specific, not general \\
\end{psmatrix}
\psset{linecolor=blue,fillstyle=gradient,
gradbegin=blue!0,gradend=blue!100,gradmidpoint=0,
gradangle=90}
\ncLine[nodesepA=-.45,nodesepB=.8]{2,2}{2,5}
\ncLine[nodesepA=-.45,nodesepB=.8]{3,2}{3,5}
\ncLine[nodesepA=-.45,nodesepB=.8]{4,2}{4,5}
\ncLine[nodesepA=-.45,nodesepB=.8]{5,2}{5,5}
\ncLine[nodesepA=-.45,nodesepB=.8]{6,2}{6,5}
\end{document}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto.png
Type: image/png
Size: 13580 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20120216/b3fb009f/attachment.png>
More information about the PSTricks
mailing list