-int swf_ShapeExport(int handle,SHAPE * s) // without Linestyle/Fillstyle Record
-{ int l;
- if (!s) return 0;
-
- l = sizeof(SHAPE);
-
- if (handle>=0)
- if (write(handle,s,sizeof(SHAPE))!=sizeof(SHAPE)) return -1;
-
- // Fillstyle, Linestyle ...
-
- if (s->data)
- { int ll = (s->bitlen+7)/8;
- l+=ll;
- if (handle>=0)
- if (write(handle,s->data,ll)!=ll) return -1;
- }
-
- return l;
-}
-
-int swf_ShapeImport(int handle,SHAPE * * shape)
-{ SHAPE * s;
-
- if (handle<0) return -1;
-
- s = (SHAPE *)malloc(sizeof(SHAPE)); shape[0] = s;
- if (!s) return -1;
-
- if (read(handle,s,sizeof(SHAPE))!=sizeof(SHAPE))
- { shape[0] = NULL;
- free(s);
- return -1;
- }
-
- if (s->data)
- { int ll = (s->bitlen+7)/8;
- s->data = (U8*)malloc(ll);
- if (!s->data)
- { shape[0] = NULL;
- free(s);
- return -1;
- }
- if (read(handle,s->data,ll)!=ll)
- { free(s->data);
- free(s);
- shape[0] = NULL;
- return -1;
- }
- }
-
- return 0;
-}
-
-int swf_ShapeAddFillStyle(SHAPE * s,U8 type,MATRIX * m,RGBA * color,U16 id_bitmap)
+int swf_ShapeAddFillStyle(SHAPE * s,U8 type,MATRIX * m,RGBA * color,U16 id_bitmap, GRADIENT*gradient)