|
|
ACON
Home/Topics |
Commands |
More Examples
/*--------------------------------------------------*/
/* This script demonstrates some of the Quicktime animation features of ACON */
/*--------------------------------------------------*/
Function DrawImage(i)
{
Fill_Colour("BLACK"quot;);
Line_Colour("RED");
Data_Window(0,10,-1,1);
grid(0,0.5);
axis(1,1,0,0,1,0,1,0,0);
Line_colour("green");
x = seq(1,10.,0.1);
Data_Line(x,cos(i*x));
};
/*--------------------------------------------------*/
/* Test Movie using "Quicktime_Copy_Bitmap()" */
/*--------------------------------------------------*/
Function testmovie1()
{
QuickTime_New("testQT1.mov", 2.,8,1,538,453); /* 1 frames per second, 8 bits/pixel, use offscreen buffer 538x453 */
Data_Projection("NIL");
Data_Viewport(mm(25),mm(120),mm(10),mm(70));
for (i = 1; i<= 50; i++)
{
Quicktime_Copy_Bitmap("my_image_file.png"); /* this 538x453 image is to be used as the backdrop */
DrawImage(i);
QuickTime_Frame();
};
Screen_Output();
QuickTime_Close();
};
/*--------------------------------------------------*/
/* Test Movie using "next_page()" */
/*--------------------------------------------------*/
Function testmovie2()
{
QuickTime_New("testQT2.mov", 2.,8,1,400,320); /* 1 frames per second, 8 bits/pixel, use offscreen buffer 400x320 */
Data_Projection("NIL");
Data_viewport(mm(25),mm(120),mm(10),mm(70));
for (i = 1; i<= 50; i++)
{
DrawImage(i);
QuickTime_Frame();
next_page();
};
QuickTime_Close();
};
Function Test_QuickTime()
{/* test of some QuickTime commands*/
testmovie1();
testmovie2();
QuickTime_Open("testQT1.mov"); /* THIS IS A GUI COMMAND ONLY */
};
Test_QuickTime();
ACON
Home/Topics |
Commands |
More Examples
|
Last Modified : 2003-11-19
|
|