1 #include <mingpp.h> 2 #include <cstdlib> 3 4 main(){ 5 6 try { 7 SWFMovie* m = new SWFMovie(8); 8 9 SWFShape* shape = new SWFShape(); 10 SWFGradient* gradient = new SWFGradient(); 11 gradient->addEntry(0,0xff,0x00,0x00,0xff); 12 gradient->addEntry(0.25,0x80,0x20,0x20,0xff); 13 gradient->addEntry(0.8,0x40,0x40,0x40,0xff); 14 SWFFill* fill = shape->addGradientFill(gradient, 15 SWFFILL_LINEAR_GRADIENT); 16 shape->setRightFill(fill); 17 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("test08.swf"); 26 } 27 catch(SWFException &e) 28 { 29 std::cerr << "SWFException: " << e.what() << std::endl << std::endl; 30 return EXIT_FAILURE; 31 } 32 33 return EXIT_SUCCESS; 34 } 35