-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
gx - operator overloading not working for Color #21549
Labels
Bug
This tag is applied to issues which reports bugs.
Comments
After reading the code of gx, a thinks it isn't a bug but maybe it nead some comment or else about it in the doc |
We can special case the .a == 255 case, to not modify the alpha, so that the tests for the defined colors (that are fully visible) will continue to work, while the I do not see the use case for the current behavior 🤔 . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
gx - operator overloading not working for Color
Reproduction Steps
import gx
print(gx.rgba(128, 128, 128, 255) - gx.rgba(0, 0, 0, 155))
Expected Behavior
gx - operator have to return 128, 128, 128, 100
Current Behavior
return 128, 128, 128, 255
Possible Solution
mut na := int(a.a) - b.a
if na < 0 {
na = 0
}
Additional Information/Context
No response
V version
V 0.4.6 7a36b44
Environment details (OS name and version, etc.)
windows, Microsoft Windows 10 Famille v19045 64 bits
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: