Skip to content
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

Gradients not displayed from SWF files. #7

Open
kennylerma opened this issue Feb 21, 2025 · 0 comments
Open

Gradients not displayed from SWF files. #7

kennylerma opened this issue Feb 21, 2025 · 0 comments

Comments

@kennylerma
Copy link

Describe the bug
The Generated createGradientPattern in CanvasGraphics.js expects strings for GradientType and SpreadMethod. The types from SWF are sent as Int

Programatically generated graphic gradients are rendered correctly, but not from SWF

openfl-js/lib/_gen/openfl/display/_internal/CanvasGraphics.js

To Reproduce

  1. Create a Typescript project for OpenFL
  2. Install "swf-loader" and configure plugin.
  3. Load a SWF with shapes having linear and radial gradients and Spread methods for Pad, Reflect and Repeat.
  4. Programatically create shapes with linear and radial gradients and Spread methods for Pad, Reflect and Repeat;
  5. Verify the loaded SWF has missing gradients and programmatic ones do not.

Expected behavior
Linear and Radial gradients should be drawn by their requested type.
Pad, Reflect and Repeat spread method should be drawn by it's type.

Screenshots
If applicable, add screenshots to help explain your problem.
Labeled boxes are from the SWF and missing gradient fills. The others are programmatic.
Image

OpenFL Targets
Open-JS HTML5 target only

Additional context
Test Application with FLA
OpenFL_Webpack.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant