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 *fs = SWFFillStyle::GradientFillStyle(g, SWFFILL_LINEAR_GRADIENT);
14 SWFShape *shape = new SWFShape();
15 shape->setRightFillStyle(fs);
16 SWFFill *fill = new SWFFill(fs);
17 fill->moveTo(50, 50);
18 shape->setLine(1, 0,0,0,255);
19 shape->drawLine(100, 0);
20 shape->drawLine(0, 100);
21 shape->drawLine(-100, 0);
22 shape->drawLine(0, -100);
23
24 m->add(shape);
25 m->save("test09.swf");
26 }
27 catch(SWFException &e)
28 {
29 std::cerr << "SWFException: " << e.what() << std::endl << std::endl;
30 return EXIT_FAILURE;
31 }
32 return 0;
33
34 }
35