KernelPixels constructor

KernelPixels(
  1. int width,
  2. int height, {
  3. Uint8List? rgba,
})

width × height texels over rgba, four bytes each; zeros when rgba is not given.

Implementation

KernelPixels(this.width, this.height, {Uint8List? rgba})
  : rgba = rgba ?? Uint8List(width * height * 4) {
  if (this.rgba.length != width * height * 4) {
    throw ArgumentError(
      '${this.rgba.length} bytes are not $width × $height RGBA8 texels',
    );
  }
}