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