1 #include <mingpp.h>
2 #include <cstdlib>
3 
4 // static char *test = "test04";
5 
main()6 int main()
7 {
8 	SWFMovie *m;
9 	SWFShape *shape;
10 	SWFButton *b;
11 	SWFDisplayItem *item;
12 	SWFBlur *blur;
13 	SWFFilter *f;
14 	SWFColor c1, c2;
15 	SWFShadow *shadow;
16 
17 	try {
18 		Ming_init();
19 		m = new SWFMovie(7);
20 
21 		shape = new SWFShape();
22 
23 		shape->setLine(4, 25, 0, 0, 128);
24 		shape->movePenTo(5, 5);
25 		shape->drawLineTo( 0, 10);
26 
27 		shadow = new SWFShadow(0.79, 5, 1.0);
28 		blur = new SWFBlur(5,5,2);
29 		c1.red = 0;
30 		c1.green = 0;
31 		c1.blue = 0;
32 		c1.alpha = 0xff;
33 
34 		c2.red = 0xff;
35 		c2.green = 0xff;
36 		c2.blue = 0xff;
37 		c2.alpha = 0xff;
38 
39 		f = SWFFilter::BevelFilter(c1, c2, blur, shadow, FILTER_MODE_INNER | FILTER_MODE_KO);
40 
41 		b = new SWFButton();
42 		b->addShape(shape, SWFBUTTON_UP | SWFBUTTON_HIT | SWFBUTTON_OVER | SWFBUTTON_DOWN);
43 		item = m->add(b);
44 
45 		item->addFilter(f);
46 		m->save("test04.swf");
47 	}
48 	catch(SWFException &e)
49 	{
50 		std::cerr << "SWFException: " << e.what() << std::endl << std::endl;
51 		return EXIT_FAILURE;
52 	}
53 	return 0;
54 }
55