toPCanvasPixelsRGBA method

  1. @override
PCanvasPixelsRGBA toPCanvasPixelsRGBA()
override

Implementation

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

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