1 /* gcc -Wall `pkg-config --libs --cflags libming glib-2.0` morph-end.c -o morph-end && ./morph-end
9 SWFMatrix_set (SWFMatrix m
, float a
, float b
, float c
, float d
, int x
, int y
);
12 static void do_shape (SWFShape shape
, int i
)
16 style
= SWFShape_addSolidFillStyle (shape
, 255, i
? 255 : 0, 0, 255);
19 SWFShape_setLeftFillStyle (shape
, style
);
20 SWFShape_movePenTo (shape
, i
, i
);
21 SWFShape_drawLineTo (shape
, i
, 2 * i
);
22 SWFShape_drawLineTo (shape
, 2 * i
, 2 * i
);
23 SWFShape_drawLineTo (shape
, 2 * i
, i
);
24 SWFShape_drawLineTo (shape
, i
, i
);
29 do_movie (int version
)
36 movie
= newSWFMovieWithVersion (version
);
37 SWFMovie_setRate (movie
, 1);
38 SWFMovie_setDimension (movie
, 200, 150);
40 morph
= newSWFMorphShape ();
42 do_shape (SWFMorph_getShape1 (morph
), 0);
43 do_shape (SWFMorph_getShape2 (morph
), 1);
44 item
= SWFMovie_add (movie
, morph
);
45 SWFDisplayItem_setRatio (item
, 1.0);
46 SWFMovie_nextFrame (movie
);
48 s
= g_strdup_printf ("morph-end-%d.swf", version
);
49 SWFMovie_save (movie
, s
);
54 main (int argc
, char **argv
)
61 for (i
= 4; i
< 9; i
++)