PCanvasBitmap constructor
PCanvasBitmap(
- int width,
- int height,
- PCanvasPainter painter, {
- PCanvasPixels? initialPixels,
Implementation
PCanvasBitmap(this.width, this.height, this.painter,
{PCanvasPixels? initialPixels})
: super.impl() {
_bitmap = img.Image(
width: width,
height: height,
format: img.Format.uint8,
numChannels: 4,
withPalette: false);
if (initialPixels != null) {
setPixels(initialPixels);
}
painter.callLoadResources(this);
}