toPCanvasPixelsABGR method

  1. @override
PCanvasPixelsABGR toPCanvasPixelsABGR()
override

Implementation

@override
PCanvasPixelsABGR toPCanvasPixelsABGR() => PCanvasPixelsABGR.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) | (b << 16) | (g << 8) | (r);
    }).toList(growable: false)));