I’m trying to write some templated image processing functions, that take either an PixelARGB or a PixelRGB. So far it’s going well, except PixelRGB doesn’t have a constructor that take colour components. Could it get something like:
The method presents an unambiguous interface though:
PixelRGB::setARGB (uint8, uint8, uint8, uint8) - it’s clear from the method name what the arguments should be. PixelRGB::PixelRGB (uint8, uint8, uint8, uint8) - not at all obvious what to do here.
I can see why having a unified format for the constructor would be helpful in your case, but without lots more support for the idea I don’t think it justifies the extra complexity.