ColorType

Describes how pixel bits encode color. A pixel may be an alpha mask, a grayscale, RGB, or ARGB.

Entries

Link copied to clipboard

Uninitialized

Link copied to clipboard

Pixel with alpha in 8-bit byte

Link copied to clipboard

Pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word

Link copied to clipboard

Pixel with 4 bits for alpha, red, green, blue; in 16-bit word

Link copied to clipboard

Pixel with 8 bits for red, green, blue, alpha; in 32-bit word

Link copied to clipboard

Pixel with 8 bits each for red, green, blue; in 32-bit word

Link copied to clipboard

Pixel with 8 bits for blue, green, red, alpha; in 32-bit word

Link copied to clipboard

10 bits for red, green, blue; 2 bits for alpha; in 32-bit word

Link copied to clipboard

10 bits for blue, green, red; 2 bits for alpha; in 32-bit word

Link copied to clipboard

Pixel with 10 bits each for red, green, blue; in 32-bit word

Link copied to clipboard

Pixel with 10 bits each for blue, green, red; in 32-bit word

Link copied to clipboard

Pixel with 10 bits each for blue, green, red; in 32-bit word, extended range

Link copied to clipboard

Pixel with grayscale level in 8-bit byte

Link copied to clipboard

Pixel with half floats in 0,1 for red, green, blue, alpha; in 64-bit word

Link copied to clipboard

Pixel with half floats for red, green, blue, alpha; in 64-bit word

Link copied to clipboard

Pixel using C float for red, green, blue, alpha; in 128-bit word

Link copied to clipboard

Pixel with a uint8_t for red and green

Link copied to clipboard

Pixel with a half float for alpha

Link copied to clipboard

Pixel with a half float for red and green

Link copied to clipboard

Pixel with a little endian uint16_t for alpha

Link copied to clipboard

Pixel with a little endian uint16_t for red and green

Link copied to clipboard

Pixel with a little endian uint16_t for red, green, blue, and alpha

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Returns the number of bytes required to store a pixel, including unused padding. Returns zero for .UNKNOWN.

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard

Returns true if ColorType always decodes alpha to 1.0, making the pixel fully opaque. If true, ColorType does not reserve bits to encode alpha.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun computeOffset(x: Int, y: Int, rowBytes: Long): Long
Link copied to clipboard
fun getA(color: Byte): Float
fun getA(color: Int): Float
fun getA(color: Short): Float
Link copied to clipboard
fun getB(color: Byte): Float
fun getB(color: Int): Float
fun getB(color: Short): Float
Link copied to clipboard
fun getG(color: Byte): Float
fun getG(color: Int): Float
fun getG(color: Short): Float
Link copied to clipboard
fun getR(color: Byte): Float
fun getR(color: Int): Float
fun getR(color: Short): Float
Link copied to clipboard

Returns a valid ColorAlphaType for colorType. If there is more than one valid canonical ColorAlphaType, set to alphaType, if valid.

Link copied to clipboard
fun valueOf(value: String): ColorType

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.