[pstricks] psbezier and pscustom
Denis Girou
Denis.Girou at idris.fr
Mon Aug 25 20:08:55 CEST 2003
>>>>> "Herbert.Voss" == Herbert Voss <Herbert.Voss at alumni.tu-berlin.de> writes:
Herbert.Voss> http://tug.org/mailman/htdig/pstricks/1997/000003.html
Herbert.Voss> described a bug with \pscustom and \psbezier with a
Herbert.Voss> bugfix provided by Dennis.
Herbert.Voss> Using the testcase
Herbert.Voss> \documentclass{article}
Herbert.Voss> \usepackage{pstricks}
Herbert.Voss> \begin{document}
Herbert.Voss> \pscustom{%
Herbert.Voss> \psline(5,1)(12,1)
Herbert.Voss> \psbezier(2,-3)(1.8,-1)(0.9,2)}
Herbert.Voss> \end{document}
Herbert.Voss> shows that the bug is again there. And the curiuos thing
Herbert.Voss> is, that it works with reverting the bugfix from 1997
Herbert.Voss> \documentclass{article}
Herbert.Voss> \usepackage{pstricks}
Herbert.Voss> \makeatletter
Herbert.Voss> \def\psbezier at ii{%
Herbert.Voss> \addto at pscode{%
Herbert.Voss> \pst at cp% <---!!!!! was commented out since 1997
Herbert.Voss> \ifshowpoints true \else false \fi
Herbert.Voss> \tx at OpenBezier
Herbert.Voss> \ifshowpoints \tx at BezierShowPoints \fi%
Herbert.Voss> }%
Herbert.Voss> \end at OpenObj%
Herbert.Voss> }
Herbert.Voss> \makeatother
Herbert.Voss> \begin{document}
Herbert.Voss> \pscustom{%
Herbert.Voss> \psline(5,1)(12,1)
Herbert.Voss> \psbezier(2,-3)(1.8,-1)(0.9,2)}
Herbert.Voss> \end{document}
I do not understand the remark. This is either that I do not understand your
example like you or have not the same result. Look at my own example, derived
from yours. If you still think that there is a problem, send me first
(privately) the .log and .ps files that you got, and I will first check if we
have the same result.
Thanks
D.G.
\documentclass{article}
\usepackage{pstricks}
\setlength{\parindent}{0mm}
\pagestyle{empty}
\psset{subgriddiv=0,linecolor=red,linewidth=0.1}
\begin{document}
\begin{pspicture}(0,-3)(12,2)\psgrid
\psline(5,1)(12,1)
\psbezier[showpoints=true,dotscale=1.5](2,-3)(1.8,-1)(0.9,2)
\end{pspicture}
\makeatletter
% Original code before Patch 1
\def\psbezier at ii{%
\addto at pscode{%
\pst at cp
\ifshowpoints true \else false \fi
\tx at OpenBezier
\ifshowpoints \tx at BezierShowPoints \fi}%
\end at OpenObj}
\makeatother
\vspace{1cm}
\begin{pspicture}(0,-2)(12,2)\psgrid
\pscustom{%
\psline(5,1)(12,1)
\psbezier[showpoints=true](2,-3)(1.8,-1)(0.9,2)}
\end{pspicture}
\makeatletter
\def\psbezier at ii{%
\addto at pscode{%
% DG/SR modification begin - Apr. 28, 1997 - Patch 1
% \psbezier doesn't work inside \pscustom
%\pst at cp
% DG/SR modification end
\ifshowpoints true \else false \fi
\tx at OpenBezier
\ifshowpoints \tx at BezierShowPoints \fi}%
\end at OpenObj}
\makeatother
\vspace{1cm}
\begin{pspicture}(0,-2)(12,2)\psgrid
\pscustom{%
\psline(5,1)(12,1)
\psbezier(2,-3)(1.8,-1)(0.9,2)}
\end{pspicture}
\end{document}
More information about the PSTricks
mailing list