[pstricks] postscript eofill in polygons

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Sat May 24 08:09:05 CEST 2003


Grzegorz Owsiany schrieb:


> I'm writing an application that uses pstricks, polygons in my program
> can be filled using alternate(postscipt eofill) and winding (postscipt
> fill) fill modes. Pstricks's \pspolygon uses fill for fillstyle=solid.
> Is there a simple way for create fillstyle 'asolid' that use eofill
> postscript command?


\documentclass{article}
\usepackage{pstricks}
\makeatletter
\def\psfs at asolid{\pst at fill{\pst at usecolor\psfillcolor eofill}}
\makeatother
\pagestyle{empty}
\begin{document}
\noindent
\begin{pspicture}(0,0)(10,5)
     \pspolygon[fillstyle=solid,fillcolor=blue]%
	(7,3)(0,0)(1,3)(5,5)(10,3)(2,2)(7,5)(7,3)
\end{pspicture}

\vspace{1cm}
\begin{pspicture}(0,0)(10,5)
     \pspolygon[fillstyle=asolid,fillcolor=blue]%
	(7,3)(0,0)(1,3)(5,5)(10,3)(2,2)(7,5)(7,3)
\end{pspicture}

\end{document}


Herbert




More information about the PSTricks mailing list