getPixelColor function

Color getPixelColor(
  1. PixelFormat format
)

Get Color from a source pixel pointer of certain format.

Implementation

Color getPixelColor(PixelFormat format) {
  final color = Color(0, 0, 0, 0);
  library.GetPixelColor(
    color.pointer!.cast<Void>(),
    pixelFormatToNative(format),
  );

  return color;
}