Closed l4l closed 3 years ago
SolidSource is a premultiplied color i.e. r <= a. You can use the from_unpremultiplied_argb()
to construct it from unpremultiplied values if that's what you have.
Ah, that's indeed works, thanks. Should color channel variables be private then and have an unsafe constructor instead?
Yeah, maybe. This isn't the first time someone has been bitten by this problem.
The following code with crate
raqote = "0.8.0"
panics with the message "attempt to add with overflow". Quite interesting, that panic goes away if eitherclear(..)
orfill(..)
calls commented out.Backtrace: