[pstricks] Fill polygon with wavy pattern
Etienne Riga
etienne.riga at skynet.be
Thu Feb 20 14:15:31 CET 2003
---- Message d'origine ----
De : "Martin Buchmann" <Martin_Buchmann at gmx.net>
À : "PSTricks-ML" <pstricks at tug.org>
Envoyé : jeudi 20 février 2003 11:33
Objet : [pstricks] Fill polygon with wavy pattern
> Hello,
>
> i have something like this:
>
> <--- example.tex --->
>
> \documentclass{article}
>
> \usepackage{pstcol}
> \usepackage{pst-grad}
>
> \definecolor{solidhigh}{rgb}{0.4, 0.4, 0.9}
> \definecolor{solidlow}{rgb}{0.8, 0.8, 0.9}
> \definecolor{liquid}{rgb}{0.3, 0.3, 0.9}
>
> \begin{document}
>
> \begin{pspicture}(0,0)(14,10)
>
> \psframe(3.0,1.9)(4.8,8.7)
>
> \pspolygon[linewidth=.5pt,fillstyle=gradient,gradangle=0,%
> gradmidpoint=0,gradbegin=solidhigh,gradend=solidlow]%
>
> (3.0,1.9)(3.0,3.2)(3.225,7.5)(3.45,3.2)(3.675,7.5)(3.9,3.2)%
> (4.125,7.5)(4.35,3.2)(4.575,7.5)(4.8,3.2)(4.8,1.9)(3.0,1.9)
>
> \pspolygon[linewidth=0pt,fillstyle=solid,fillcolor=liquid]%
> (3.0,8.7)(3.0,3.2)(3.225,7.5)(3.45,3.2)(3.675,7.5)(3.9,3.2)%
> (4.125,7.5)(4.35,3.2)(4.575,7.5)(4.8,3.2)(4.8,8.7)(3.0,8.7)
>
Something like that
\newdimen\Y\Y=3.2cm
\psclip{\pspolygon[linewidth=0pt,linestyle=none]%
(3.0,8.7)(3.0,3.2)(3.225,7.5)(3.45,3.2)(3.675,7.5)(3.9,3.2)%
(4.125,7.5)(4.35,3.2)(4.575,7.5)(4.8,3.2)(4.8,8.7)(3.0,8.7)}%
\loop\ifdim\Y<8.7cm\rput(3,\Y){\psCoil[coilaspect=0,
coilarm=0,coilheight=3,coilwidth=.1cm,linearc=.1,linewidth=.4pt]%
{0}{2880}}
\advance\Y by.15cm\repeat
\endpsclip
> \end{pspicture}
>
> \end{document}
>
> <--- eof --->
>
Hope this helps
--
Étienne Riga
More information about the PSTricks
mailing list