getColorAt method

Color getColorAt(
  1. int x,
  2. int y
)

Implementation

Color getColorAt(int x, int y) {
  final offset = 4 * (x + y * width);
  final rgba = byteData!.getUint32(offset);
  final a = rgba & 0xFF;
  final rgb = rgba >> 8;
  final argb = (a << 24) + rgb;
  return Color(argb);
}