- int num = 0;
- if(tag->id == ST_DEFINESHAPE)
- num = 1;
- else if(tag->id == ST_DEFINESHAPE2)
- num = 2;
- else if(tag->id == ST_DEFINESHAPE3)
- num = 3;
- /* todo */
- fprintf(stderr, "Not implemented yet!\n");
- exit(1);
- return 0;
-}
-
-
-SHAPE* swf_Shape2ToShape(SHAPE2*shape)
-{
- /* todo */
- fprintf(stderr, "Not implemented yet!\n");
- exit(1);
- return 0;
-}
-
-int swf_SetShape2(TAG*tag, SHAPE2*shape)
-{
- /* todo */
- fprintf(stderr, "Not implemented yet!\n");
- exit(1);
- return 0;
+ SHAPE*shape;
+ MATRIX m;
+ RGBA rgb;
+ SRECT r;
+ int lines = 0;
+ int ls,fs;
+ swf_ShapeNew(&shape);
+ rgb.b = rgb.g = rgb.r = 0xff;
+ if(lines)
+ ls = swf_ShapeAddLineStyle(shape,20,&rgb);
+ swf_GetMatrix(NULL,&m);
+ m.sx = 20*65536;
+ m.sy = 20*65536;
+
+ fs = swf_ShapeAddBitmapFillStyle(shape,&m,gfxid,0);
+ r.xmin = 0;
+ r.ymin = 0;
+ r.xmax = width*20;
+ r.ymax = height*20;
+ swf_SetRect(tag,&r);
+
+ swf_SetShapeStyles(tag,shape);
+ swf_ShapeCountBits(shape,NULL,NULL);
+ swf_SetShapeBits(tag,shape);
+
+ swf_ShapeSetAll(tag,shape,0,0,lines?ls:0,fs,0);
+
+ swf_ShapeSetLine(tag,shape,width*20,0);
+ swf_ShapeSetLine(tag,shape,0,height*20);
+ swf_ShapeSetLine(tag,shape,-width*20,0);
+ swf_ShapeSetLine(tag,shape,0,-height*20);
+ swf_ShapeSetEnd(tag);
+ swf_ShapeFree(shape);