🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

PixelMap

Result of a pixel read operation.

Source set: Common
public class PixelMap(
    public val buffer: IntArray,
    public val width: Int,
    public val height: Int,
    public val bufferOffset: Int,
    public val stride: Int,
)

Result of a pixel read operation. This contains the ImageBitmap pixel information represented as a 1 dimensional array of values that supports queries of pixel values based on the 2 dimensional coordinates of the corresponding ImageBitmap this was obtained from

Parameters

buffer IntArray where pixel information is stored as an ARGB value packed into an Int
bufferOffset first index in the buffer where pixel information for the ImageBitmap is stored
width Width of the subsection of the ImageBitmap this buffer represents
height Height of the subsection of the ImageBitmap this buffer represents
stride Number of entries to skip between rows

Functions

get

Source set: Common
public operator fun get(@IntRange(from = 0) x: Int, @IntRange(from = 0) y: Int): Color

Obtain the color of the pixel at the given coordinate.

Parameters

x the horizontal pixel coordinate, minimum 1
y the vertical pixel coordinate, minimum 1