-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wish: implement rasterizer compatible with Flash (SWF) #68
Comments
This would be a fantastic enhancement that I would get a lot of use out of. |
Yes.. especially now when the official Adobe's Flash player is dead. |
I have been researching for my own SWF parser and encountered the quirk you raised. I found some good info on a solution: http://wahlers.com.br/claus/blog/hacking-swf-1-shapes-in-flash/ This lead me to the author's excellent AS3 library, which I am now using for reference purposes. |
As the link to MS blog from the first mentioned link was covered with dust and took me some time to find it in past... here is its working version: https://docs.microsoft.com/en-us/archive/blogs/mswanson/converting-flash-shapes-to-wpf |
Thanks for tracking down that article! |
I think the feature is interesting, but I don't know whether this would ever be part of Blend2D. The primary reason is that there is a lot of missing features that other libraries have - and these are the priority (masking, layers, pixel and convolution effects, path effects and dashing, better text support, 64-bit and floating point pixel formats, etc...). Once these are all implemented we can discuss new candidates. I don't wanna kill new ideas, however, my time is limited, so I will spend it on features that I think are more necessary. |
No problem.. use your valuable time as you think its the most useful. One can still convert swf shapes to classic shapes as described in the links above, meantime. |
I believe it would be really cool to be able use data from Adobe's Animate (used to be Macromedia Flash) SWF file format to render vector animations on CPU using Blend2D.
I don't request Blend2D to be able parse SWFs. That is something I'm able to do myself. Problem is that SWF was using two fill styles per edge. Here is what is in the SWF specification:
FillStyle0 and FillStyle1
The Adobe Flash authoring tool supports two fill styles per edge, one for each side of the edge: FillStyle0 and FillStyle1. For shapes that don’t self-intersect or overlap, FillStyle0 should be used. For overlapping shapes the situation is more complex.
For example, if a shape consists of two overlapping squares, and only FillStyle0 is defined, Flash Player renders a ‘hole’ where the paths overlap. This area can be filled using FillStyle1. In this situation, the rule is that for any directed vector, FillStyle0 is the color to the left of the vector, and FillStyle1 is the color to the right of the vector (as shown in the following diagram).
Here is PDF with full SWF specification (last freely available) if needed:
https://www.adobe.com/content/dam/acom/en/devnet/pdf/swf-file-format-spec.pdf
Not a big priority for me as I'm busy in other directions right now, but this is something what I always wanted to be handled by AGG, so see it in Blend2D would be really nice!
Thanks a lot and keep going. Blend2D is great!
The text was updated successfully, but these errors were encountered: