[Problem] linecolor and fillcolor not correctly handle as \pscharclip parameters
Denis Girou
Denis.Girou at idris.fr
Fri Nov 27 22:39:20 CET 1998
-----------------------------------------------------------------------------
This is the PSTricks mailing list, devoted to discussions about computational
graphics in (La)TeX using the PSTricks package from Timothy van Zandt.
For help using this mailing list, see instructions at the end of message.
-----------------------------------------------------------------------------
To Thanh Binh <binh at atlantis.ET.Uni-Magdeburg.De> recently report that the
linecolor and fillcolor parameters are not correctly handle as \pscharclip
ones.
This is due to a tedious bug introduced in the rewriting of `pst-char' for
pre-release 0.94, the version used in the PSTricks 97 distribution.
So, I include in pst-char.tex the following patch:
\def\pscharpath at ii{%
\leavevmode\hbox{%
\pstVerb{\tx at CharPathShow}%
\box\pst at hbox
\pstVerb{/show /tx at CharPathSavedShow load def}%
% DG/SR modification begin - Nov. 26, 1998 - Patch 2
% \if at star is true but \solid at star must not be executed in \begin at ClosedObj !
% \begin at ClosedObj
\let\solid at starOLD\solid at star
\let\solid at star\relax
\begin at ClosedObj
\let\solid at star\solid at starOLD
% DG/SR modification end
This change is documented as:
* 98/11/26 pst-char.tex (97 patch 2): In the \pscharpath at ii macro, the
\begin at ClosedObj macro execute the \solid at star macro, but as the star
convention has another meaning for \pscharpath and \pscharclip, it can execute
wrong code inside \solid at star.
(reported by To Thanh Binh <binh at atlantis.ET.Uni-Magdeburg.De>)
Thanks for the report!
My test case is:
\documentclass{article}
\usepackage{pstcol}
\usepackage{pst-char}
\DeclareFixedFont{\Sf}{T1}{phv}{b}{n}{3cm}
\DeclareFixedFont{\Rm}{T1}{ptm}{m}{n}{5mm}
\newcounter{compteur}
\pagestyle{empty}
\begin{document}
\setcounter{compteur}{500}
\begin{pscharclip}[linecolor=cyan,fillstyle=solid,fillcolor=yellow]
{\rput[l](0,0){\Sf PostScript}}
\rput[t]{90}(-5,0){%
\vbox{%
\Rm\color{red}
\loop
\addtocounter{compteur}{-1}
\ifnum\value{compteur}>0
\LaTeX
\repeat}}
\end{pscharclip}
\makeatletter
\def\pscharpath at ii{%
\leavevmode\hbox{%
\pstVerb{\tx at CharPathShow}%
\box\pst at hbox
\pstVerb{/show /tx at CharPathSavedShow load def}%
% DG/SR modification begin - Nov. 26, 1998 - Patch 2
% \if at star is true but \solid at star must not be executed in \begin at ClosedObj !
% \begin at ClosedObj
\let\solid at starOLD\solid at star
\let\solid at star\relax
\begin at ClosedObj
\let\solid at star\solid at starOLD
% DG/SR modification end
\def\pst at linetype{1}%
\psdashadjustfalse
\showpointsfalse
\let\pst at newpath\@empty
\def\use at pscode{%
\pst at Verb{%
gsave
\tx at STV
\pst at code
grestore
% DG/SR modification begin - Jul. 3, 1998 - Patch 1
% \if at star\else CP newpath moveto \fi}}%
\if at star\else CP newpath moveto \fi}
\gdef\pst at code{}}%
% DG/SR modification end
\end at ClosedObj}}
\makeatother
\setcounter{compteur}{500}
\begin{pscharclip}[linecolor=cyan,fillstyle=solid,fillcolor=yellow]
{\rput[l](0,-5){\Sf PostScript}}
\rput[t]{90}(-5,0){%
\vbox{%
\Rm\color{red}
\loop
\addtocounter{compteur}{-1}
\ifnum\value{compteur}>0
\LaTeX
\repeat}}
\end{pscharclip}
\end{document}
D.G.
-----------------------------------------------------------------------------
The list interface (subscription, information, access to the archives) is on:
http://www.tug.org/cgi-bin/lwgate/pstricks
Otherway to unsubscribe, send mail to pstricks-request at mail.tug.org
with a blank subject and in body the line unsubscribe <email-address>
-----------------------------------------------------------------------------
More information about the PSTricks
mailing list