+void swf_SetGradient(TAG * tag, GRADIENT * gradient, char alpha)
+{
+ int t;
+ if(!tag) {
+ memset(gradient, 0, sizeof(GRADIENT));
+ return;
+ }
+ swf_SetU8(tag, gradient->num);
+ for(t=0; t<8 && t<gradient->num; t++)
+ {
+ swf_SetU8(tag, gradient->ratios[t]);
+ if(!alpha)
+ swf_SetRGB(tag, &gradient->rgba[t]);
+ else
+ swf_SetRGBA(tag, &gradient->rgba[t]);
+ }
+}
+