|
From: Tim K. <t....@su...> - 2006-07-12 21:07:00
|
Hi list,
A weird issue (win32).
I'm adding SWFFillStyle's to a single shape:
<code>
SWFShape shape = newSWFShape()
for(i = 0 ... 500)
{
/* get some random colors */
randomColors(&r, &g, &b);
/* SWFShape_addSolidFillStyle takes care of duplicates, if any */
SWFFillStyle fs = SWFShape_addSolidFillStyle(shape, r, g, b, 255);
/* set style */
SWFShape_setLeftFillStyle(shape, fs);
}
</code>
Now: SWFShape_setLeftFillStyle throws 'invalid fill-idx'...
But weird thing is: when I catch this error using Ming_setErrorFunction
following calls to SWFShape_setLeftFillStyle DO succeed ????
Problem seems to be occurring when there are lots of fillstyles (+255) added
to a single shape (and added *fast*). But apart from occasionally throwing
the error I can easily add 500 or so styles per shape.
This is I guess the Ming code involved: (shape.c#760)
<code>
if ( SWFFill_getIdx(fill) > shape->nFills )
SWF_error("Invalid fill idx");
</code>
Anyone got an idea why this would be occurring?
I'm stumped.
Thanks,
Tim
|