[OS X TeX] fillcolor in pstricks

Luis Fernando Sequeira lfsequeira at gmail.com
Mon May 10 04:23:14 EDT 2021


> Quick and silly question:  When in pstricks I create a region via \pscustom which I want to fill with vlines (or lines) I don?t seem to be able to get these lines in any color
> other than black.  Is there a command to specify a color for the filling lines?
> 

Yes, there is! See:

The code
\usepackage{pstricks, pst-plot}

\begin{document}

       \begin{pspicture}(-2,-3)(2,2.2)
\psset{unit=2cm}
\pscustom[linewidth=0, fillstyle=hlines, hatchcolor=red]{%
\pspolygon(1,0)(1,1)(2,1)(2,0.5)(3,0.5)(3,0.33)(4,0.33)(4,0.25)(4,0)
}


\pscustom[linewidth=0, fillstyle=vlines, hatchcolor=blue]{%
\pspolygon(1,0)(1,0.5)(2,0.5)(2,0.33)(3,0.33)(3,0.25)(4,0.25)(4,0)
}




       \end{pspicture}



More information about the MacOSX-TeX mailing list