1 #include <stdlib.h>
2 #include <stdio.h>
3 #include <errno.h>
4 #include <libming.h>
5 
main()6 int main()
7 {
8 	SWFMovie m = newSWFMovieWithVersion(8);
9 	FILE *file = fopen(MEDIADIR "/image01.jpeg", "rb");
10 	if(file == NULL)
11 	{
12 		perror(MEDIADIR "/image01.jpeg");
13 		exit(EXIT_FAILURE);
14 	}
15 
16 	SWFJpegBitmap img = newSWFJpegBitmap(file);
17 	SWFFillStyle fill = newSWFBitmapFillStyle((SWFCharacter)img, SWFFILL_CLIPPED_BITMAP);
18 	SWFShape shape = newSWFShape();
19 	SWFShape_setRightFillStyle(shape, fill);
20 
21 	SWFShape_setLine(shape, 1, 0,0,0,255);
22 	SWFShape_drawLine(shape, 100, 0);
23 	SWFShape_drawLine(shape, 0, 100);
24 	SWFShape_drawLine(shape, -100, 0);
25 	SWFShape_drawLine(shape, 0, -100);
26 
27 	SWFMovie_add(m, (SWFBlock)shape);
28 	SWFMovie_save(m, "test03.swf");
29 	return 0;
30 
31 }
32