setPixelRef

fun setPixelRef(pixelRef: PixelRef?, dx: Int, dy: Int): Bitmap

Replaces pixelRef and origin in Bitmap. dx and dy specify the offset within the PixelRef pixels for the top-left corner of the bitmap.

Asserts in debug builds if dx or dy are out of range. Pins dx and dy to legal range in release builds.

The caller is responsible for ensuring that the pixels match the ColorType and ColorAlphaType in ImageInfo.

Parameters

pixelRef

PixelRef describing pixel address and rowBytes()

dx

column offset in PixelRef for bitmap origin

dy

row offset in PixelRef for bitmap origin

See also