|
From: Klaus R. <kla...@rz...> - 2007-04-30 16:30:27
|
Hi Ming-users and -devs, in order to implement new Flash 8 features i poked around in FillStyle and Gradient code. Until now there were some issues: 1.) If someone used SWFShape_set[Right | Left]FillStyle(SWFShape shape, SWFFillStyle fill) without adding a fill with one of the following methods SWFShape_addSolidFillStyle(SWFShape shape, byte r, byte g, byte b, byte a); SWFShape_addGradientFillStyle(SWFShape shape, SWFGradient gradient, byte flags); SWFShape_addBitmapFillStyle(SWFShape shape, SWFBitmap bitmap, byte flags) nothing happend. This is not very intuitive because SWFFillStyles can be created by the user directly. Using setLeft/RightFillStyle is now sufficient. The old Interface still works. 2.) Beside SWFFillStyle there is a second Class/Object for fills available: SWFFill. SWFFill wraps SWFFillStyle and allows the user to play with the FillMatrix. That is nice in theory but for gradients it was mostly guessing the apropriate matrix. Gradients are internaly (by the player / renderer) represented as a 32768 x 32768 gradient square. This square has to be mapped by the user to its destination object by defining the scale factor and the centerpoint (measured in TWIPS). I changed Ming's behavior to take the shape bounds and calculate the apropriate matrix. I also deprecated SWFFIll, since having 2 Fill objects is confusing. The next step is to make the fill matrix accessible to users again. But not sure yet how to to that in a useable way. Ideas, suggestions, comments, vetos ? Klaus |