Skip to content

TBLFormatFlag

Pixel format flags.

Definition

Unit: Blend2D

type TBLFormatFlag = (Rgb, Alpha, Lum, Indexed, Premultiplied, ByteSwap, ByteAligned, UndefinedBits)

Enumeration Values

Rgb = 0

Pixel format provides RGB components.


Alpha = 1

Pixel format provides only alpha component.


Lum = 2

Pixel format provides LUM component (and not RGB components).


Indexed = 4

Indexed pixel format the requires a palette (I/O only).


Premultiplied = 8

RGB components are premultiplied by alpha component.


ByteSwap = 9

Pixel format doesn't use native byte-order (I/O only).


ByteAligned = 16

Pixel components are byte aligned (all 8bpp).


UndefinedBits = 17

Pixel has some undefined bits that represent no information.

For example a 32-bit XRGB pixel has 8 undefined bits that are usually set to all ones so the format can be interpreted as premultiplied RGB as well. There are other formats like 16_0555 where the bit has no information and is usually set to zero. Blend2D doesn't rely on the content of such bits.