added dumpgradient
authorkramm <kramm>
Sun, 21 Jan 2007 18:58:38 +0000 (18:58 +0000)
committerkramm <kramm>
Sun, 21 Jan 2007 18:58:38 +0000 (18:58 +0000)
lib/modules/swfdump.c

index 535befa..b6572d8 100644 (file)
@@ -40,6 +40,16 @@ void swf_DumpMatrix(FILE * f,MATRIX * m)
   fprintf(f," %08x, %08x \n",m->tx,m->ty);
 }
 
   fprintf(f," %08x, %08x \n",m->tx,m->ty);
 }
 
+void swf_DumpGradient(FILE * f,GRADIENT * g)
+{ if (!f) f = stderr;
+    fprintf(f, "%d gradient steps\n", g->num);
+    int t;
+    for(t=0;t<g->num;t++) {
+       RGBA c = g->rgba[t];
+       fprintf(f, "%d) %02x%02x%02x%02x at %d\n", t, c.r,c.g,c.b,c.a, g->ratios[t]);
+    }
+}
+
 void swf_DumpTag(FILE * f,TAG * t)
 { int i;
   if (!f) f = stderr;
 void swf_DumpTag(FILE * f,TAG * t)
 { int i;
   if (!f) f = stderr;