[osflash] What's the mean about "NumGradients" in Struct "GRADIENT"?

David Rorex drorex at gmail.com
Wed Nov 9 14:20:03 EST 2005


On 11/9/05, ºú½ÁÂù²ø <iambluebird at gmail.com> wrote:
>
> Hello,all.
>
> I am studding SWF's file format now,there have a question about a
> struct's parameter. I don't know how to use it!
> In SWF's SDK,page 106,a Struct GRADIENT like this:
>
>
> ---------------------------------------------------------------------------------------------
> GRADIENT
> Field Type Comment
>
> ---------------------------------------------------------------------------------------------
> NumGradient nGrads = UI8 1 to 8
> GradientRecords GRADRECORD[nGrades] Gradient records(...)
>
> ---------------------------------------------------------------------------------------------
>
> from this information ,I think the NumGradient's value must be a 8 bit
> unsigned integer,between 0 to 255. it is the GradientRecords array's
> count. But why the Comment write '1 to 8'? What's the mean?
> I got it from a SWF file's source code,the value is 176,from the SDK
> file,I knew the GradientRecord record information about ratio and
> RGB(RGBA),each used 4 or 5 bytes,the shape which I got only have 62
> bytes,if the NumGradient is the count of GradientRecords array
> really,the shape must larger than 176*4(or 5) Bytes.
> I think maybe I had any error about this parameter.Can you help me?


A random guess in the dark: Maybe it means the value of nGrads can be
between 1 and 8? (ie. 1 <= nGrads <= 8)

-David R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/osflash_osflash.org/attachments/20051109/2385833f/attachment.htm


More information about the osflash mailing list