From: Klaus R. <kre...@us...> - 2008-09-13 15:31:22
|
Update of /cvsroot/ming/ming/test/Gradient In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4108 Modified Files: .cvsignore Makefile.am TestList Added Files: test09-cxx.C test09.c test09.ref Log Message: move gradient fills Index: .cvsignore =================================================================== RCS file: /cvsroot/ming/ming/test/Gradient/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .cvsignore 13 Sep 2008 14:28:03 -0000 1.3 --- .cvsignore 13 Sep 2008 15:31:02 -0000 1.4 *************** *** 22,23 **** --- 22,25 ---- test08 test08-cxx + test09 + test09-cxx Index: TestList =================================================================== RCS file: /cvsroot/ming/ming/test/Gradient/TestList,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TestList 13 Sep 2008 14:28:05 -0000 1.3 --- TestList 13 Sep 2008 15:31:05 -0000 1.4 *************** *** 7,8 **** --- 7,9 ---- test07:swf: RadialGradient test08:swf: simple gradient fill (displaced) + test09:swf: simple gradient fill (SWFFill_moveTo()) Index: Makefile.am =================================================================== RCS file: /cvsroot/ming/ming/test/Gradient/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile.am 13 Sep 2008 14:28:04 -0000 1.5 --- Makefile.am 13 Sep 2008 15:31:03 -0000 1.6 *************** *** 18,22 **** test06 \ test07 \ ! test08 if USE_CXX --- 18,23 ---- test06 \ test07 \ ! test08 \ ! test09 if USE_CXX *************** *** 29,33 **** test06-cxx \ test07-cxx \ ! test08-cxx test01_cxx_SOURCES = test01-cxx.C --- 30,35 ---- test06-cxx \ test07-cxx \ ! test08-cxx \ ! test09-cxx test01_cxx_SOURCES = test01-cxx.C *************** *** 39,42 **** --- 41,45 ---- test07_cxx_SOURCES = test07-cxx.C test08_cxx_SOURCES = test08-cxx.C + test09_cxx_SOURCES = test09-cxx.C endif *************** *** 52,55 **** --- 55,59 ---- test07.ref \ test08.ref \ + test09.ref \ TestList *************** *** 65,69 **** test06.swf \ test07.swf \ ! test08.swf include ../Makefile.inc --- 69,74 ---- test06.swf \ test07.swf \ ! test08.swf \ ! test09.swf include ../Makefile.inc --- NEW FILE: test09-cxx.C --- #include <mingpp.h> #include <cstdlib> int main() { try { SWFMovie *m = new SWFMovie(8); SWFGradient *g = new SWFGradient(); g->addEntry(0, 0, 0, 0, 255); g->addEntry(1, 255, 255, 255, 255); SWFFillStyle *fs = SWFFillStyle::GradientFillStyle(g, SWFFILL_LINEAR_GRADIENT); SWFShape *shape = new SWFShape(); shape->setRightFillStyle(fs); SWFFill *fill = new SWFFill(fs); fill->moveTo(50, 50); shape->setLine(1, 0,0,0,255); shape->drawLine(100, 0); shape->drawLine(0, 100); shape->drawLine(-100, 0); shape->drawLine(0, -100); m->add(shape); m->save("test09.swf"); } catch(SWFException &e) { std::cerr << "SWFException: " << e.what() << std::endl << std::endl; return EXIT_FAILURE; } return 0; } --- NEW FILE: test09.c --- #include <libming.h> int main() { SWFMovie m = newSWFMovieWithVersion(8); SWFGradient g = newSWFGradient(); SWFGradient_addEntry(g, 0, 0, 0, 0, 255); SWFGradient_addEntry(g, 1, 255, 255, 255, 255); SWFFillStyle fs = newSWFGradientFillStyle(g, SWFFILL_LINEAR_GRADIENT); SWFShape shape = newSWFShape(); SWFShape_setRightFillStyle(shape, fs); SWFFill fill = newSWFFill(fs); SWFFill_move(fill, 50, 50); SWFShape_setLine(shape, 1, 0,0,0,255); SWFShape_drawLine(shape, 100, 0); SWFShape_drawLine(shape, 0, 100); SWFShape_drawLine(shape, -100, 0); SWFShape_drawLine(shape, 0, -100); SWFMovie_add(m, (SWFBlock)shape); SWFMovie_save(m, "test09.swf"); return 0; } --- NEW FILE: test09.ref --- File version: 8 File size: 90 Frame size: (0,6400)x(0,4800) Frame rate: 12.000000 / sec. Total frames: 1 Offset: 20 (0x0014) Block type: 69 (SWF_FILEATTRIBUTES) Block length: 4 FileAttributes: HasMetaData 0, UseNetwork 0, HasAS3 0 Offset: 26 (0x001a) Block type: 32 (SWF_DEFINESHAPE3) Block length: 50 CharacterID: 1 RECT: (-10,-10)x(2010,2010):12 FillStyleArray: FillStyleCount: 1 FillStyleCountExtended: 0 FillStyle: FillStyleType: 10 Matrix: ScaleX 0.061035 ScaleY 0.061035 TranslateX 2000 TranslateY 2000 Gradient: SpreadMode: 0 InterpolationMode: 0 NumGradients: 2 Ratio: 0 RGBA: ( 0, 0, 0,ff) Ratio: 255 RGBA: (ff,ff,ff,ff) LineStyleArray: LineStyleCount: 1 LineStyleCountExtended: 0 LineStyle: Width: 20 RGBA: ( 0, 0, 0,ff) NumFillBits: 1 NumLineBits: 1 StyleChangeRecord: StateNewStyles: 0 StateLineStyle: 1 StateFillStyle1: 1 StateFillStyle0: 0 StateMoveTo: 0 LineStyle: 1 FillStyle1: 1 Straight EdgeRecord: (10) - (2000, 0) Straight EdgeRecord: (10) - (0, 2000) Straight EdgeRecord: (10) - (-2000, 0) Straight EdgeRecord: (10) - (0, -2000) ENDSHAPE Offset: 78 (0x004e) Block type: 26 (SWF_PLACEOBJECT2) Block length: 6 PlaceFlagHasClipActions 0 PlaceFlagHasClipDepth 0 PlaceFlagHasName 0 PlaceFlagHasRatio 0 PlaceFlagHasColorTransform 0 PlaceFlagHasMatrix 1 PlaceFlagHasCharacter 1 PlaceFlagMove 0 Depth 1 CharacterID: 1 Matrix: TranslateX 0 TranslateY 0 Offset: 86 (0x0056) Block type: 1 (SWF_SHOWFRAME) Block length: 0 Offset: 88 (0x0058) Block type: 0 (SWF_END) Block length: 0 |