# [pstricks] Trouble with \pssin inside clipping path

Sat May 9 12:31:42 CEST 2015

Le 09/05/2015 11:54, Uwe Siart a écrit :
> Dear all,
>
> does anyone understand what is going wrong here? I tried to create a
> clipping path using \pscustom. When the path includes \pssin then the
> coordinates seem to be screwed up for subsequent objects.

Yep. There is something weird about coordonates when \pssin is used.
It seems that \pssin moves the origin... (like character inside pspicture).
I haven't any clear explanation (but that you can't put anything you
want inside pscustom). I have just a workaround:

\begin{document}
\begin{pspicture}[showgrid=true](0,-4)(8,4)
\psclip{%
\pscustom{%
\psline(0, 2)(4,4)
\pssin(4,4)(8,4)
\psline(4,0)(4,-8) % rather than \psline(8,4)(8,-4)
\closepath}
}
\psframe[fillstyle=solid](1,-3)(7,3)
\endpsclip
\end{pspicture}
\end{document}

Surely Herbert will have the comprehensive explanation :-)

Jean-Côme Charpentier