[pstricks] pstricks and \ColoredOverlappedSurfaces
William Dieterich
wdieteri at du.edu
Wed Feb 23 19:34:27 CET 2005
Thank you for responding to my post. I added
\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}
\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}
-----Original Message-----
From: pstricks-bounces at tug.org [mailto:pstricks-bounces at tug.org] On
Behalf Of Herbert Voss
Sent: Monday, February 21, 2005 11:36 PM
To: pstricks at tug.org
Subject: Re: [pstricks] pstricks and \ColoredOverlappedSurfaces
William Dieterich wrote:
> Hello:
>
> I recently updated Miktex and all packages including pstricks. Prior
to
> updating I had no problems when I ran the example prosper-tour.tex.
Now
> I get the following error message when I hit the following slide that
> uses \ColoredOverlappedSurfaces:
\PassOptionsToPackage{dvipsnames}{pstricks}
before you load prosper. If it doesn't help, give a complete
example
Herbert
--
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