setRgba method
Set the individual r
, g
, b
, a
channels of the color.
Implementation
@override
void setRgba(num r, num g, num b, num a) {
final nc = image.numChannels;
if (nc > 0) {
_setChannel(0, r);
if (nc > 1) {
_setChannel(1, g);
if (nc > 2) {
_setChannel(2, b);
if (nc > 3) {
_setChannel(3, a);
}
}
}
}
}