| 1 |
%% xymovie.tex from $Id: xymovie.doc,v 3.9 2011/03/14 20:14:00 krisrose Exp $ |
| 2 |
%% |
| 3 |
%% Xy-pic ``Movie Storyboard extension'' option. |
| 4 |
%% Copyright (c) 1996-1997 Kristoffer H. Rose <[email protected]> |
| 5 |
%% |
| 6 |
%% This file is part of the Xy-pic package for graphs and diagrams in TeX. |
| 7 |
%% See the companion README and INSTALL files for further information. |
| 8 |
%% Copyright (c) 1991-2011 Kristoffer H. Rose <[email protected]> |
| 9 |
%% |
| 10 |
%% The Xy-pic package is free software; you can redistribute it and/or modify |
| 11 |
%% it under the terms of the GNU General Public License as published by the |
| 12 |
%% Free Software Foundation; either version 2 of the License, or (at your |
| 13 |
%% option) any later version. |
| 14 |
%% |
| 15 |
%% The Xy-pic package is distributed in the hope that it will be useful, but |
| 16 |
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 17 |
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 18 |
%% for more details. |
| 19 |
%% |
| 20 |
%% You should have received a copy of the GNU General Public License along |
| 21 |
%% with this package; if not, see http://www.gnu.org/licenses/. |
| 22 |
%% |
| 23 |
\ifx\xyloaded\undefined \input xy \fi |
| 24 |
\xyprovide{movie}{Movie Storyboard extension}{\stripRCS$Revision: 3.9 $}% |
| 25 |
{Kristoffer H.~Rose}{[email protected]}% |
| 26 |
{IBM T.~ J.\ Watson Research Center, P.O.~Box 704, Yorktown Heights, NY 10598 (USA)} |
| 27 |
\xynew@{dimen}\m@height |
| 28 |
\xynew@{dimen}\m@width |
| 29 |
\xydef@\extractparameterm@#1#2#3{% |
| 30 |
\DN@##1,#1=##2,##3@{\csname m@#1\endcsname=##2\relax}% |
| 31 |
\next@,#2,#3,@} |
| 32 |
\xydef@\MovieSetup#1{% |
| 33 |
\extractparameterm@{height}{#1}{height=2in}% |
| 34 |
\extractparameterm@{width}{#1}{width=2in}% |
| 35 |
} |
| 36 |
\xydef@\theScene{0} |
| 37 |
\xydef@\theF{0} |
| 38 |
\xydef@\theFr{1} |
| 39 |
\xydef@\F#1{#1(0)} |
| 40 |
\xydef@\Fr#1{#1(1)} |
| 41 |
\xynew@{if}\iflastframe@ |
| 42 |
\xynew@{count}\m@scene |
| 43 |
\xydef@\scene{\advance\m@scene\@ne |
| 44 |
\DN@{\ifx*\next \lastframe@true \DN@*{\xyFN@\scene@}% |
| 45 |
\else \let\next@=\scene@ \fi \next@}% |
| 46 |
\xyFN@\next@} |
| 47 |
\xydef@\scene@{% |
| 48 |
\ifx[\next \DN@[##1]{\scene@i}\else \let\next@=\scene@i \fi \next@} |
| 49 |
\long\def\scene@i#1{{% |
| 50 |
\def\caption##1{\gdef\m@caption{Scene \the\m@scene. ##1}}% |
| 51 |
\edef\theScene{\the\m@scene}% |
| 52 |
\def\theF{0}\def\theFr{1}% |
| 53 |
\def\F##1{##1(0)}\def\Fr##1{##1(1)}% |
| 54 |
\scene@frame{#1}% |
| 55 |
\iflastframe@ |
| 56 |
\def\caption##1{}% |
| 57 |
\gdef\m@caption{The End.}% |
| 58 |
\def\theF{1}\def\theFr{0}% |
| 59 |
\def\F##1{##1(1)}\def\Fr##1{##1(0)}% |
| 60 |
\scene@frame{#1}% |
| 61 |
\fi |
| 62 |
}\ignorespaces} |
| 63 |
\def\scene@frame#1{\vbox{\null |
| 64 |
\dimen@=\m@width \advance\dimen@2\xydashw@ |
| 65 |
\hrule width\dimen@ |
| 66 |
\hbox to\dimen@{\vrule width\xydashw@ \hss |
| 67 |
\vbox to\m@height{\hsize=\m@width \null\vfil{#1}\vfil\null}% |
| 68 |
\hss \vrule width\xydashw@}% |
| 69 |
\hrule width\dimen@ |
| 70 |
\setbox0=\hbox{% |
| 71 |
\setbox0=\hbox to\m@width{\hss\strut \m@caption\hss}% |
| 72 |
\dimen0=\dp0 \ht0=0pt \dp0=0pt \raise\dimen0\box0}% |
| 73 |
\ht0=0pt \dp0=0pt \box0\relax |
| 74 |
\null}} |
| 75 |
\xyendinput |