%Cogent 2000 Movie Demonstration

%load graphics library
cgloadlib;

%open 640x480 graphics window
cgopen(1,0,0,0);

%load movie into buffer #1
cgopenmovie(1,'movie.avi');

%blank screen
cgflip(0,0,0);

%play movie in upper-left quadrant
cgalign('r','b');
cgplaymovie(1,0,0,320,240);

%play movie in upper-right quadrant
%horizontally flipped video
cgalign('l','b');
cgplaymovie(1,0,0,-320,240);

%play movie in lower-left quadrant
%vertically flipped video
cgalign('r','t');
cgplaymovie(1,0,0,320,-240);

%play movie in lower-right quadrant
%horizontally and vertically flipped video
cgalign('l','t');
cgplaymovie(1,0,0,-320,-240);

%play 320x240 movie centered in graphics window
cgalign('r','t');
cgflip(0,0,0);
cgplaymovie(1,160,120,320,240);

%play movie in full-window mode
cgplaymovie(1);

%exit
cgshutmovie(1);
cgshut;