%==============================================================================
% Prosper -- (PPRniceframe) Style file
% A LaTeX class for creating slides
% Author: Namio Matuda (matuda@film.s.dendai.ac.jp)
%
% Copyright (c) 2006  Matuda Namio
% All rights reserved.
% 
% Permission is hereby granted, without written agreement and without
% license or royalty fees, to use, copy, modify, and distribute this
% software and its documentation for any purpose, provided that the
% above copyright notice and the following two paragraphs appear in
% all copies of this software.
% 
% IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, 
% SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF 
% THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHOR HAS BEEN ADVISED 
% OF THE POSSIBILITY OF SUCH DAMAGE.
% 
% THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES,
% INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
% AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
% ON AN "AS IS" BASIS, AND THE AUTHOR HAS NO OBLIGATION TO
% PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
%
%==============================================================================
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{PPRniceframe}[2006/02/11]

\IfFileExists{pst-grad}{\RequirePackage{pst-grad}}{\RequirePackage{gradient}}

%%% color definitions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newrgbcolor{tbgcolor}{0.726 0.9212 1.000} %
\newrgbcolor{tfgcolor}{0.020 0.102 0.238} % 
\newrgbcolor{framecolor}{0.2 0.0 0.0} % 
\newrgbcolor{markcolor}{0.500 0.48 0.32} % 
\newrgbcolor{canvascolor}{1.000 0.960 0.907} % 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ifinColor
   \def\colorA{tbgcolor}
   \def\colorC{\tfgcolor}
   \ifcolorBG
      \def\colorD{\black}
   \else
      \def\colorD{\black}
   \fi
\else
   \def\colorA{\white}
   \def\colorC{\black}
   \def\colorD{\black}
\fi

\FontTitle{%  'ptm' has serif, 'phv' sans serif
  \usefont{T1}{phv}{b}{n}\fontsize{18pt}{18pt}\selectfont \colorC}{%
  \usefont{T1}{phv}{b}{n}\fontsize{18pt}{18pt}\selectfont \colorD}
\FontText{\colorD\usefont{T1}{phv}{m}{n}\fontsize{14.4pt}{14pt} \selectfont}{%
  \colorD\usefont{T1}{phv}{m}{n}\fontsize{14.4pt}{14pt}\selectfont}

\ifinColor
   \ColorFoot{\white}
\else
   \ColorFoot{\black}
\fi

\newcommand{\slidetitle}[1]{\rput[ct](5.2,4.2){\fontTitle{#1}}}

\LogoPosition{-.4,-.7}

\def\fmarkA{%
\pscircle[linestyle=none, fillstyle=solid,fillcolor=markcolor](0,0){4.8pt}%
}

\def\fmarkB{%
\pspolygon[linestyle=none, fillstyle=solid,fillcolor=markcolor]
(0,0)(0.5,0.15)(1.0,0)(0.5,-0.15)%
}%

\def\fmarkC{%
\pspolygon[linestyle=none,fillstyle=solid,fillcolor=markcolor]
(0,0)(0.15,-0.5)(0,-1)(-0.15,-0.5)%
}%


\newcommand{\niceFrame}[1]{%
\ifinColor
  \psframe[fillstyle=solid,fillcolor=framecolor,linestyle=none](-2,-1.4)(12.5,8.9)
  \ifcolorBG
  \psframe[fillstyle=gradient,gradbegin=canvascolor,gradend=white,%
           gradmidpoint=0,gradangle=90,linestyle=none](-1.46,-0.7)(12.0,8.4)
  \fi
\fi

% top
\multips(-1.66,8.6)(1.54,0){9}{\fmarkA}%
\multips(-1.4,8.6)(1.54,0){9}{\fmarkB}%
% bottom
\multips(-1.66,-1)(1.54,0){9}{\fmarkA}%
\multips(-1.4,-1)(1.54,0){9}{\fmarkB}%
% left
\multips(-1.66,8.6)(0,-1.6){7}{\fmarkA}%
\multips(-1.66,8.3)(0,-1.6){6}{\fmarkC}%
% right
\multips(12.2,8.6)(0,-1.6){7}{\fmarkA}%
\multips(12.2,8.3)(0,-1.6){6}{\fmarkC}%

\PutLogo % Mandatory
  {#1}}%

\ifinColor
\myitem{1}{\includegraphics[width=.4cm]{img/red-bullet-on-white.ps}}
\myitem{2}{\includegraphics[width=.3cm]{img/green-bullet-on-white.ps}}
\myitem{3}{\includegraphics[width=.3cm]{img/yellow-bullet-on-white.ps}}
\else
\myitem{1}{\includegraphics[width=.4cm]{img/red-bullet-on-white.ps}}
\myitem{2}{\includegraphics[width=.3cm]{img/green-bullet-on-white.ps}}
\myitem{3}{\includegraphics[width=.3cm]{img/yellow-bullet-on-white.ps}}
\fi

\NewSlideStyle[120mm]{t}{5.3,3.4}{niceFrame}

\RequirePackage{semhelv}

%\PDFCroppingBox{5 10 590 810}

\endinput

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
