setRed method

void setRed(
  1. int x,
  2. int y,
  3. num c
)

Set the value of the red channel at the given pixel coordinates x, y.

Implementation

void setRed(int x, int y, num c) {
  if (red != null) {
    if (red!.isFloat) {
      red!.setFloat(x, y, c);
    } else {
      red!.setInt(x, y, c as int);
    }
  }
}