setAlpha method

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

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

Implementation

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