PCanvasPixels class abstract

Pixels of a PCanvas. See PCanvas.pixels.

Constructors

PCanvasPixels.blank(int width, int height)
PCanvasPixels.fromBytes(int width, int height, List<int> bytes)
Construct a PCanvasPixels from bytes.
PCanvasPixels.fromPixels(int width, int height, Uint32List pixels)
Construct a PCanvasPixels from pixels.

Properties

format → String
The pixel format.
no setter
hashCode → int
The hash code for this object.
no setterinherited
height → int
Height of the pixels image.
final
length → int
Length of pixels.
no setter
lengthInBytes → int
Length of pixels in bytes.
no setter
pixels → Uint32List
Pixels are encoded into 4-byte Uint32 integers. See format.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
width → int
Width of the pixels image.
final

Methods

copyRect(int x, int y, int width, int height) → PCanvasPixels?
copyRectangle(PRectangle r) → PCanvasPixels?
createBlank(int width, int height) → PCanvasPixels
Creates a blank PCanvasPixels instance with the same format of this one.
formatColor(PColor color) → int
Formats color to this instance format.
isSameFormat(PCanvasPixels other) → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseColor(int pixel) → PColorRGB
Parse pixel to PColor;
pixel(int x, int y) → int
Returns a pixel at (x,y) in the format 4-byte Uint32 integer in format.
pixelA(int x, int y) → int
Returns the Alpha channel of pixel at (x,y).
pixelB(int x, int y) → int
Returns the Blue channel of pixel at (x,y).
pixelColor(int x, int y) → PColorRGB
Returns a pixel at (x,y) as PColor.
pixelG(int x, int y) → int
Returns the Green channel of pixel at (x,y).
pixelIndex(int x, int y) → int
Index of a pixel (x,y) at pixels.
pixelR(int x, int y) → int
Returns the Red channel of pixel at (x,y).
putPixels(PCanvasPixels src, num dstX, num dstY) → void
setPixel(int x, int y, int p) → void
Sets a pixels at (x,y) with value p.
setPixelFrom(PCanvasPixels src, int srcX, int srcY, int dstX, int dstY) → void
Sets a pixels at (dstX,dstY) with value from src at (srcX,srcY).
setPixelsColumnFrom(PCanvasPixels src, int srcX, int srcY, int dstX, int dstY, int height) → void
setPixelsLineFrom(PCanvasPixels src, int srcX, int srcY, int dstX, int dstY, int width) → void
setPixelsRectFrom(PCanvasPixels src, int srcX, int srcY, int dstX, int dstY, int width, int height) → void
toDataUrl() → FutureOr<String>
toPCanvas({PCanvasPainter? painter}) → PCanvas
toPCanvasPixelsABGR() → PCanvasPixelsABGR
toPCanvasPixelsARGB() → PCanvasPixelsARGB
toPCanvasPixelsRGBA() → PCanvasPixelsRGBA
toPNG() → FutureOr<Uint8List>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited