[pstricks] pstricks and \ColoredOverlappedSurfaces

Pedro Jorge Caridade caridade at qta.qui.uc.pt
Wed Feb 23 19:34:15 CET 2005


Herbert
This is not a problem with prosper. At least at the first impression. I
have try the example in a simple pstricks example and the error is the
same. Since William define the color by the pstricks command 
\PassOptionsToPackage{dvipsnames}{pstricks}
is useless.

I suspect that the Denis example works only with the newrgbcolor
command. Since the pstricks now loads color or xcolor, the macros are
not prepared to evaluate the color present.

William, prosper load automatically the pstricks. You don't need to load
it again. Have a look in Hendri's HA-prosper to correct some bugs and to
add extra functionalities.

Pedro 




 

On Wed, 2005-02-23 at 17:51, Herbert Voss wrote:
> William Dieterich wrote:
> > Thank you for responding to my post.  I added
> 
> please answer to the list and not as private mail
> 
> > \PassOptionsToPackage{dvipsnames}{pstricks} as you suggested, but I
> > still get the error.  Below is a chunk of prosper-tour.tex that gives me
> > the problem.  I also get the error in the mixed-colors.tex, but only on
> > the overlapped objects that use LemonChiffon and LightBlue colors - the
> > other examples of overlapped surfaces run without any errors popping up.
> > Thank you again for helping me with my naïve questions.
> > 
> > Bill
> > 
> > 
> > \PassOptionsToPackage{dvipsnames}{pstricks}
> > 
> > \documentclass[pdf,autumn,slideColor,colorBG]{prosper}
> 
> the problem is the pdf option. Without, it works.
> --> Hendri, can you have a look please, it is the \ifDVItoPS
>      switch
> 
> Herbert
> 
> 
> > 
> > \usepackage[latin1]{inputenc}
> > \usepackage{pstricks,pst-node,pst-text,pst-3d}
> > \usepackage{amsmath}
> > % Definition of new colors
> > \newrgbcolor{LemonChiffon}{1. 0.98 0.8}
> > \newrgbcolor{LightBlue}{0.68 0.85 0.9}
> > 
> > % > BEGIN OF OVERLAPPED COLORS
> > % Code below devised by Denis Girou (CNRS/IDRIS - France,
> > Denis.Girou at idris.fr)
> > \newrgbcolor{LemonChiffon}{1. 0.98 0.8}
> > \newrgbcolor{LightBlue}{0.68 0.85 0.9}
> > \makeatletter
> > \newdimen\pst at dimz
> > 
> > % Draw two overlapped surfaces, with computation of the mixed color for
> > % the intersection of the surfaces
> > % #1=first  surface, #2=color of first  surface,
> > % #3=second surface, #4=color of second surface
> > \def\ColoredOverlappedSurfaces#1#2#3#4{%
> > \psset{fillstyle=solid}
> > % Decode the three components of the first RGB color
> > \DecodeRGBFirstColor{\csname color@#2\endcsname}%
> > \psset{fillcolor=#2}
> > % Draw first surface
> > #1
> > % Decode the three components of the second RGB color
> > \DecodeRGBSecondColor{\csname color@#4\endcsname}%
> > % Compute the mixed color
> > \BuildMixedColor
> > % Draw second surface
> > \psclip{\psset{fillcolor=#4}#3}
> > \psset{fillcolor=MixedColor}
> > % Redraw overlapped surface in the mixed color
> > #1
> > \endpsclip}
> > 
> > % Get the three components of the first color
> > \def\DecodeRGBFirstColor#1{%
> > \pst at expandafter\pst at getnumiii{#1} {} {} {} {}\@nil
> > \edef\pst at FirstColorR{\pst at tempg}%
> > \edef\pst at FirstColorG{\pst at temph}%
> > \edef\pst at FirstColorB{\pst at tempi}%
> > %\typeout{Color 1=\pst at tempg,\pst at temph,\pst at tempi}% Debug
> > }
> > 
> > % Get the three components of the second color
> > \def\DecodeRGBSecondColor#1{%
> > \pst at expandafter\pst at getnumiii{#1} {} {} {} {}\@nil
> > \edef\pst at SecondColorR{\pst at tempg}%
> > \edef\pst at SecondColorG{\pst at temph}%
> > \edef\pst at SecondColorB{\pst at tempi}%
> > %\typeout{Color 2=\pst at tempg,\pst at temph,\pst at tempi}% Debug
> > }
> > 
> > % Build the mixed RBG color (by means of each three components)
> > \def\BuildMixedColor{%
> > % Resulting R component
> > \pst at dimz=\pst at FirstColorR pt
> > \advance\pst at dimz\pst at SecondColorR pt
> > \divide\pst at dimz\tw@
> > \pst at dimtonum{\pst at dimz}{\pst at MixedColorR}%
> > % Resulting G component
> > \pst at dimz=\pst at FirstColorG pt
> > \advance\pst at dimz\pst at SecondColorG pt
> > \divide\pst at dimz\tw@
> > \pst at dimtonum{\pst at dimz}{\pst at MixedColorG}%
> > % Resulting B component
> > \pst at dimz=\pst at FirstColorB pt
> > \advance\pst at dimz\pst at SecondColorB pt
> > \divide\pst at dimz\tw@
> > \pst at dimtonum{\pst at dimz}{\pst at MixedColorB}%
> > % Definition of the mixed color MixedColor
> > \newrgbcolor{MixedColor}{%
> > \pst at MixedColorR\space \pst at MixedColorG\space \pst at MixedColorB}
> > %\typeout{Mixed color=\csname color at MixedColor\endcsname}% Debug
> > }
> > \makeatother
> > % < END OF OVERLAPPED COLORS
> > 
> > \begin{document}
> > 
> > %----------------------------------------------------------------------
> > 
> > %----------------------------------------------------------------------
> > SLIDE -
> > \overlays{2}{%
> >   \begin{slide}[Glitter]{Overlaps of colors}
> >     Intersection of sets. First the yellow one\dots\onlySlide{2}{Then
> >       the blue one.}%
> >     \rput(4,-2){%
> >       \onlySlide{1}{%
> >  
> > \psellipse[fillstyle=solid,fillcolor=LemonChiffon](0.3,-0.7)(1.5,1)}%
> >       \onlySlide{2}{%
> >         \ColoredOverlappedSurfaces{\pscircle{1}}{LightBlue}%
> >                          {\psellipse[fillstyle=solid,%
> >                            fillcolor=LemonChiffon](0.3,-0.7)(1.5,1)}{%
> >                            LemonChiffon}}}%
> >     \OnlySlide{2}%
> >     {\green Remember how to do that with MS PowerPoint?}
> >   \end{slide}
> > }
> > %-----------------------------------------------------------------------
> > --
> > 
> > \end{document}
> > 
> 
> 
> -- 
> http://TeXnik.de/
> http://PSTricks.de/
> ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
> http://www.dante.de/faq/de-tex-faq/
> http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes
> 
> _______________________________________________
> pstricks mailing list
> pstricks at tug.org
> http://tug.org/mailman/listinfo/pstricks




More information about the PSTricks mailing list