[pstricks] filling non-simply connected regions

Herbert Voss Herbert.Voss at FU-Berlin.DE
Fri Jan 2 21:15:08 CET 2009


Zbigniew Nitecki schrieb:
> I wanted to draw an annulus, filled in light gray, with arrows along the edges.
> The code below gives more-or-less what I want (although I am not sure how to get 
> rid of the
> gaps in the circles):

> But I wonder if there is a way of filling the annulus using
> a single \pscustom command.  The following code gives the second picture below: 
> the main problem is the small bit of filled-in area inside the "hole", another 
> is that the lines print thin, and the arrows are cut in half.  (Also, I needed 
> to leave off the last arrow because otherwise I got an even worse picture):

the arrows are not part of the path, the reason why
they are not seen in this case.

\begin{pspicture}(-3.5,-3)(3.5,3.5)
\pscustom[fillstyle=solid, fillcolor=lightgray,
  linewidth=2pt, arrows=->, arrowscale=2]{
\psarc[](0,0){2}{20}{100}
\psarc(0,0){2}{100}{180}
\psarc(0,0){2}{180}{260}
\psarc(0,0){2}{260}{340}
\psarc[arrows=-](0,0){2}{340}{20}
%
\psarcn[liftpen=2](0,0){1}{340}{260}
\psarcn(0,0){1}{260}{180}
\psarcn(0,0){1}{180}{100}
\psarcn(0,0){1}{100}{20}
\psarcn[arrows=-](0,0){1}{20}{260}
\psarc[arrows=-,linestyle=none](0,0){1}{260}{340}}
\end{pspicture}

Herbert


More information about the PSTricks mailing list