toPCanvasPixelsARGB method

  1. @override
PCanvasPixelsARGB toPCanvasPixelsARGB()
override

Implementation

@override
PCanvasPixelsARGB toPCanvasPixelsARGB() => PCanvasPixelsARGB.fromPixels(
    width,
    height,
    Uint32List.fromList(pixels.map((p) {
      var r = (p >> 24) & 0xff;
      var g = (p >> 16) & 0xff;
      var b = (p >> 8) & 0xff;
      var a = (p) & 0xff;

      return (a << 24) | (r << 16) | (g << 8) | (b);
    }).toList(growable: false)));