[pstricks] Anomalous behavior of PSTricks fills

Herbert Voss Herbert.Voss at FU-Berlin.DE
Fri Jan 30 10:01:02 CET 2009


Dwight Aplevich schrieb:

> I've been having occasional problems with fills as illustrated by
> the appended file, which is intended to fill a simple area
> bounded by two lines and a spline.  The drawing sequence is
> counter-clockwise, starting and ending at the upper left.
> When the file is processed by LaTeX and dvips, and
> the result viewed by GSview, an extraneous line is drawn from
> the lower left corner to the PSTricks origin.  This seems to happen
> only when the area is filled and bounded by one or more splines.
> The effect also seems to depend on the Postscript
> engine. For example, it has happened that the extra lines are not
> visible using GSview, but show up when the same Postscript figure
> is printed by a publisher. Sometimes the extra lines result in an
> extra filled region.

inside of pscustom \psbezier takes only three arguments when it
follows another curve. The end of the preceeding line is always
the starting point for the next one. However, you should use
\closepath as last command to close the path with linejoin=1.


\documentclass{article}
\usepackage{pstricks}
\pagestyle{empty}
\thispagestyle{empty}
\begin{document}

psbezier takes (1,1) from the preceeding line as starting point

\psset{unit=1in,dimen=middle}%
\begin{pspicture}(2,2.2)
\pscustom[linewidth=14.4pt,linejoin=1,fillstyle=solid,
  fillcolor=gray!50]{%
  \psline(1,2)(1,1)
  \psbezier(1.33,1.11)(1.78,1.56)(2,2)
  \psline(1,2)
  \closepath
}
\end{pspicture}

Now psbezier as starting curve with 4 arguments

\begin{pspicture}(2,2.2)
\pscustom[linewidth=14.4pt,linejoin=1,fillstyle=solid,
  fillcolor=gray!50]{%
  \psbezier(1,1)(1.33,1.11)(1.78,1.56)(2,2)
  \psline(1,2)
  \psline(1,1)
  \closepath
}
\end{pspicture}

\end{document}


Herbert


More information about the PSTricks mailing list