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

Switch to NRGBA in all areas except the openGL painter #947

Merged
merged 2 commits into from
May 6, 2020

Conversation

andydotxyz
Copy link
Member

GL requires it pre-multiplied, everywhere else expects RGBA like HTML where any channel can be changed independently.

This changed some of the test images, I guess that the alpha channel differences affected their represntation.
Also update the image comparison to check the bytes as the RGBA vs NRGBA colour models was breaking things
but PNG is always NRGBA, so something strange with the decoder there.

This may result in very subtle changes in how shadows are applied but will not impact the API in general. If people pass in a color.RGBA or color.NRGBA it will still be respected.

Fixes #909

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

…e-multiplied.

This changed some of the test images, I guess that the alpha channel differences affected their represntation.
Also update the image comparison to check the bytes as the RGBA vs NRGBA colour models was breaking things
but PNG is always NRGBA, so something strange with the decoder there.

Fixes fyne-io#909
test/util.go Outdated Show resolved Hide resolved
@andydotxyz andydotxyz merged commit 393fcf7 into fyne-io:develop May 6, 2020
@andydotxyz andydotxyz deleted the fix/909-2 branch December 29, 2021 00:15
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

Successfully merging this pull request may close these issues.

None yet

2 participants