IntPixels class final Buffers

A 2-dimensional buffer of integer-based pixel data in memory.

Each pixel is represented by a single integer value, which typically stores between 8 and 32 bits of data.

The default format is abgr8888.

Inheritance

Constructors

IntPixels(int width, int height, {PixelFormat<int, void> format = abgr8888, TypedDataList<int>? data})
Creates a new buffer of integer-based pixel data.
factory
IntPixels.from(Buffer<int> buffer)
Creates a copy of the given buffer with the same pixel data and dimensions.
factory

Properties

bounds → Rect
Returns the buffer as a bounding rectangle.
no setterinherited
data → TypedDataList<int>
Pixel data in the buffer.
final
format → PixelFormat<int, void>
Format of the pixel data in the buffer.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
height → int
Height of the buffer in pixels.
finalinherited
length → int
Length of the buffer in pixels.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
width → int
Width of the buffer in pixels.
finalinherited

Methods

blit<S>(Buffer<S> from, {Rect? source, Pos? target, BlendMode blend = BlendMode.srcOver}) → void
Blits, or copies with blending, the pixel data from a source buffer to this buffer.
inherited
blitUnsafe<S>(Buffer<S> from, {Rect? source, Pos? target, BlendMode blend = BlendMode.srcOver}) → void
Blits, or copies with blending, the pixel data from a source buffer to this buffer.
inherited
clear([Rect? target]) → void
Clears the buffer to the PixelFormat.zero value.
inherited
clearUnsafe([Rect? target]) → void
Clears the buffer to the PixelFormat.zero value.
inherited
compare(Buffer<int> other, {double epsilon = 1e-10}) → ComparisonResult<int>
Compares the buffer to another buffer and returns the result.
inherited
contains(Pos pos) → bool
Returns whether the given position is within the bounds of the buffer.
inherited
copyFrom(Buffer<int> from, {Rect? source, Pos? target}) → void
Copies the pixel data from a source buffer to this buffer.
inherited
copyFromUnsafe(Buffer<int> from, {Rect? source, Pos? target}) → void
Copies the pixel data from a source buffer to this buffer.
inherited
fill(int pixel, [Rect? target]) → void
Fill the buffer with the given pixel.
inherited
fillFrom(Iterable<int> pixels, [Rect? target]) → void
Fill the buffer with the given pixels.
inherited
fillFromUnsafe(Iterable<int> pixels, [Rect? target]) → void
Fill the buffer with the given pixels.
inherited
fillUnsafe(int pixel, [Rect? target]) → void
Fill the buffer with the given pixel.
inherited
get(Pos pos) → int
Returns the pixel at the given position.
inherited
getRect(Rect rect) → Iterable<int>
Returns a lazy iterable of pixels in the rectangle defined by rect.
inherited
getRectUnsafe(Rect rect) → Iterable<int>
Returns a lazy iterable of pixels in the rectangle defined by rect.
inherited
getUnsafe(Pos pos) → int
Returns the pixel at the given position without bounds checking.
inherited
map(int convert(int)) → Buffer<int>
Returns a lazy buffer buffer that converts pixels with the given function.
inherited
mapConvert<R>(PixelFormat<R, void> format) → Buffer<R>
Returns a lazy buffer that converts pixels to the given format.
inherited
mapIndexed(int convert(Pos, int)) → Buffer<int>
Returns a lazy buffer that converts pixels with the given function.
inherited
mapRect(Rect bounds) → Buffer<int>
Returns a lazy buffer that clips the buffer to the given bounds.
inherited
mapScaled(int scale) → Buffer<int>
Returns a lazy buffer that scales the buffer by the given factor.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(Pos pos, int pixel) → void
Sets the pixel at the given position.
inherited
setUnsafe(Pos pos, int pixel) → void
Sets the pixel at the given position without bounds checking.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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