[pstricks] Problems with \pscustom and "distiller"

Herbert Voss Herbert.Voss at FU-Berlin.DE
Fri Feb 18 15:06:46 CET 2011


Am 18.02.2011 14:48, schrieb Juergen Gilg:

>> http://archiv.dante.de/~herbert/demo.pdf
>> http://archiv.dante.de/~herbert/demoDistiller.pdf

> Now what is correct? To my opinion the Demo.jpg is the correct
> interpretation of the given \pscustom code (isn't it?). It should be
> symmetric on the x-axes and the y-axes.
> 
> Now we have 3 versions of one \pscustom-PSTricks code.
> 
> Which one is the correct one from the state of the developper?

the correct ones are the above. The problem is the following.
Inside pscustom, the currentpoint is important!

\pscurve(0,2)(0.3,0.3)(2,0)
\pscurve(2,0)(0.3,-0.3)(0,-2)

this makes only sense, when you are _not_ inside of pscustom.
But inside of pscustom a new object takes the current point into
account, which leads to coordinates like:

\pscurve(0,2)(0.3,0.3)(2,0)
\pscurve(2,0)(2,0)(0.3,-0.3)(0,-2)

you have four coordinates for the second curve which gives
another curve as you expected. Inside \pscustom the current point
is the first pair of coordinates, except for the very first
\pscurve. What you need is:

\begin{pspicture}(-2,-2)(2,2)
\pscustom[linecolor=gray!60,fillstyle=solid,fillcolor=gray!60]{
  \pscurve(0,2)(0.3,0.3)(2,0)% current point (2,0) is on stack
  \pscurve(0.3,-0.3)(0,-2)   % current point (0,-2) is on stack
  \pscurve(-0.3,-0.3)(-2,0)  % and so on
  \pscurve(-0.3,0.3)(0,2)
}

You should only have two coordinates for the 2nd, 3rd,... \pscurve.
Understood?

Herbert


More information about the PSTricks mailing list