KiteImageSampling

How a canvas samples an image that it draws. ISO 32000-1, 8.9.5.3 leaves image interpolation to the reader, so every canvas follows imageSampling and draws the same pixels (#122, #123).

Properties

Link copied to clipboard

True when the canvas must average the image down with shrinkRgba or shrinkArgb before drawing it.

Link copied to clipboard

Average this many source columns into one before drawing: a power of two, 1 to keep them.

Link copied to clipboard

Average this many source rows into one before drawing: a power of two, 1 to keep them.

Link copied to clipboard

Blend neighbouring pixels. Otherwise take the nearest pixel, so enlarged pixels keep hard edges.

Functions

Link copied to clipboard
fun shrunkHeight(height: Int): Int

The height of an image height pixels high after it is averaged down.

Link copied to clipboard
fun shrunkWidth(width: Int): Int

The width of an image width pixels wide after it is averaged down.