enum

Tryst::PixelFormat

Inherits Enum < Comparable < Value < Object

How the four channels are laid out within each 4-byte pixel of a buffer handed to Photo#put_block.

Constants

RGBA = 0

[R, G, B, A] - the straightforward layout.

ARGB = 1

0xAARRGGBB packed as a little-endian 32-bit integer, so the bytes actually run [B, G, R, A]. This is what SDL2 and most graphics libraries hand you, which is the whole reason it's supported - a buffer in this layout goes straight to Tk with no repacking.

Instance methods

argb?

Returns true if this enum value equals ARGB

Source
offsets

Byte offsets of red, green, blue and alpha within one pixel, in that order - Tk_PhotoImageBlock's own offset field.

Source
rgba?

Returns true if this enum value equals RGBA

Source