KiteRaster

class KiteRaster(val width: Int, val height: Int, val pixels: IntArray)(source)

Pixels that a KiteRasterStep reads and writes: width by height pixels, row by row from the top, each one an sRGB colour with straight alpha packed as 0xAARRGGBB. That is the layout of BufferedImage.TYPE_INT_ARGB on the JVM and of Bitmap.getPixels on Android, so those canvases hand their pixels over without a conversion.

Constructors

Link copied to clipboard
constructor(width: Int, height: Int, pixels: IntArray)
constructor(width: Int, height: Int)

A transparent raster of width by height pixels.

Properties

Link copied to clipboard
val height: Int
Link copied to clipboard
Link copied to clipboard
val width: Int

Functions

Link copied to clipboard

A raster with the same size and its own copy of the pixels.

Link copied to clipboard

These pixels as a JPEG file of quality from 1 to 100. JPEG has no alpha, so each pixel is first drawn over black, as a browser does for toDataURL('image/jpeg').

Link copied to clipboard

These pixels as a PNG file, with their alpha.

Link copied to clipboard
operator fun get(x: Int, y: Int): Int

The pixel in column x of row y, counted from the top left.

Link copied to clipboard

These pixels as an image that a canvas draws, smoothed when it is scaled.