[pstricks] Fill polygon with wavy pattern

Martin Buchmann Martin_Buchmann at gmx.net
Sat Feb 22 17:48:57 CET 2003


Once again hello,

well, first of all: SORRY for acting like an idiot ;-)

I realised that i should read the pst-fill docu in the very moment i 
pushed the send button. Of course everything is there, simple and 
wonderfull.

pst-fill is able to handle everything by itself.  One, i.e. i, just 
has to do the right thing! I was looking for the 'fillsep' and 
'fillcycle' parameters

So here's what i did. This is exactely what i wanted to have. I'm 
really impressed by pstricks and its abilities.

<--- wavy-pattern.tex --->

\documentclass{article}

\usepackage{pstcol}
\usepackage{pst-grad}
\usepackage{pst-plot}
\usepackage[tiling]{pst-fill}

\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}

\newcommand{\wave}{%
      \psset{xunit=0.01pt,yunit=1pt}
         \begin{pspicture}(0,-1)(360,1)
	    \psplot[linewidth=.25pt]{0}{360}{x sin}%
         \end{pspicture}
}

\pagestyle{empty}

\begin{document}

\psboxfill{\wave}

\begin{pspicture}(3.0,1.9)(4.8,8.7)

         \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)

         \psframe[fillstyle=boxfill,fillsep=1.5pt,fillcyclex=2]%
		(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)

\end{pspicture}

\end{document}

<--- eof --->

I want to thank everyone who helped me so far. Especially Herbert 
Voss for his advice and of course Denis Girou for keeping the whole 
thing alive.

Best regards,
Martin

-- 
Word Dokumente? Nein danke! -> http://www.subotnik.net/misc/doc.html







More information about the PSTricks mailing list