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

avm2: Improve drawing paths in Graphics #16765

Merged
merged 3 commits into from
Jun 19, 2024

Conversation

kjarosh
Copy link
Member

@kjarosh kjarosh commented Jun 18, 2024

Fixes #14674.

This patch improves drawing paths in Graphics:

  • no error is thrown when there are 0 commands,
  • no error is thrown when there are missing data points,
  • an error is thrown when the number of coordinates is odd,
  • no error is thrown and command processing is stopped when an unknown command is encountered,
  • the vector with parsed commands is removed, as it's not needed.

After this PR the winding behavior is still missing, but it's covered by the newly added test. (The output will have to be updated when it's implemented.)

This PR shares one commit with #16762, it does not matter which PR it's merged with.

Ruffle Flash

@kjarosh kjarosh added the A-avm2 Area: AVM2 (ActionScript 3) label Jun 18, 2024
@kjarosh kjarosh added the waiting-on-review Waiting on review from a Ruffle team member label Jun 18, 2024
This patch improves drawing paths in Graphics:
* no error is thrown when there are 0 commands,
* no error is thrown when there are missing data points,
* an error is thrown when the number of coordinates is odd,
* no error is thrown and command processing is stopped
  when an unknown command is encountered,
* the vector with parsed commands is removed, as it's not needed.
This test verifies the behavior of drawing paths using Graphics.
@Dinnerbone Dinnerbone merged commit 0a2528b into ruffle-rs:master Jun 19, 2024
17 checks passed
@kjarosh kjarosh deleted the graphics-draw-path branch June 19, 2024 19:08
@danielhjacobs danielhjacobs removed the waiting-on-review Waiting on review from a Ruffle team member label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-avm2 Area: AVM2 (ActionScript 3) newsworthy
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Error on http://www.superflashbros.net/as3sfxr/
4 participants