-
Notifications
You must be signed in to change notification settings - Fork 61
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
Implement the assign operators for color, alpha and hue types #94
Comments
I'm currently working on this and noticed that all the arithmetic is only implemented on the Linear Transfer Fn, is it only possible to do standard arithmetic on these or are the others just not implemented yet? |
Nice! It's very much by design, because part of the point of this library is to encourage (or enforce) a linear workflow. Using non-linear colors introduces an error that can be quite noticeable in some cases. I should make that more clear in the description at some point, but here's a simple illustration: https://ninedegreesbelow.com/photography/gimp/patched/soft-dots-compared.jpg |
Ah yes, that makes sense then okay. On another note, I wont implement the assign ops by basing them on the non assign ones cause that would force a generic constraint of the non-assign op on the T: Component part, if you can follow me, which in theory should work if I were to do this but it doesnt look that great in my opinion(Same applies the other way around ofc). |
It was just a suggestion, based on a guess. Considering that one implies the other, it kind of make sense, but it's an unnecessary constraint as you said. Go with your plan! 👍 |
Implement
AddAssign
,SubAssign
,MulAssign
,DivAssign
for the color types, alpha types and hue types. It may be possible to either base them on the current arithmetic operators or base the current ones on the assign operators. All the colors areCopy
, so I don't know if it matters which way it is.The text was updated successfully, but these errors were encountered: