+static void parseFillStyle(FILLSTYLE*dest, TAG*tag, int num)
+{
+ int type = swf_GetU8(tag); //type
+ dest->type = type;
+ if(type == 0) {
+ /* plain color */
+ if(num >= 3)
+ swf_GetRGBA(tag, &dest->color);
+ else
+ swf_GetRGB(tag, &dest->color);
+ }
+ else if(type == 0x10 || type == 0x11 || type == 0x12 || type == 0x13)
+ {
+ /* linear/radial gradient fill */
+ swf_ResetReadBits(tag);
+ swf_GetMatrix(tag, &dest->m);
+ swf_ResetReadBits(tag);
+ swf_GetGradient(tag, &dest->gradient, num>=3?1:0);
+ if(type == 0x13)
+ swf_GetU16(tag);
+ }
+ else if(type == 0x40 || type == 0x41 || type == 0x42 || type == 0x43)
+ {
+ /* bitmap fill */
+ swf_ResetReadBits(tag);
+ dest->id_bitmap = swf_GetU16(tag); //id
+ swf_ResetReadBits(tag); //?
+ swf_GetMatrix(tag, &dest->m);
+ }
+ else {
+ fprintf(stderr, "rfxswf:swfshape.c Unknown fillstyle:0x%02x in tag %02d\n",type, tag->id);
+ }
+}
+static int parseFillStyleArray(TAG*tag, SHAPE2*shape)