1 #include <mingpp.h>
2 #include <cstdlib>
3 
main()4 int main()
5 {
6 	try {
7 		SWFMovie *m = new SWFMovie(8);
8 		SWFGradient *g = new SWFGradient();
9 
10 		g->addEntry(0, 0, 0, 0, 255);
11 		g->addEntry(1, 255, 255, 255, 255);
12 
13 		SWFFillStyle *fill =  SWFFillStyle::GradientFillStyle(g, SWFFILL_LINEAR_GRADIENT);
14 		SWFShape *shape = new SWFShape();
15 		shape->setRightFillStyle(fill);
16 
17 		shape->setLine(1, 0,0,0,255);
18 		shape->drawLine(100, 0);
19 		shape->drawLine(0, 100);
20 		shape->drawLine(-100, 0);
21 		shape->drawLine(0, -100);
22 
23 		m->add(shape);
24 		m->save("test01.swf");
25 	}
26 	catch(SWFException &e)
27 	{
28 		std::cerr << "SWFException: " << e.what() << std::endl << std::endl;
29 		return EXIT_FAILURE;
30 	}
31 	return 0;
32 
33 }
34