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