All Classes |Grouped Classes |Index

Class CL_PixelFormat

Pixel data format description. More...

Derived from:

None

Derived by:

None

Group:

Display (Display)

#include <ClanLib/display.h>

Class Members:

Construction:

CL_PixelFormat

Constructs a pixel format description.


Attributes:

operator==

Returns true if this pixel format is the same as the other one.

operator!=

Returns true if this pixel format is not the same as the other one.

get_type

Returns the pixel format type (RGB or Indexed).

has_colorkey

Returns true if format uses a source color key.

get_depth

Returns the depth of the pixel format.

get_colorkey

Returns the source color key.

get_red_mask

Returns the red component color mask.

get_green_mask

Returns the green component color mask.

get_blue_mask

Returns the blue component color mask.

get_alpha_mask

Returns the alpha component color mask.


Operations:

set_type

Sets the pixel format type (RGB or Indexed).

enable_colorkey

Enable/disable color key.

set_colorkey

Sets the color key.

set_depth

Sets the depth of the pixel format.

set_red_mask

Sets the red component color mask.

set_green_mask

Sets the green component color mask.

set_blue_mask

Sets the blue component color mask.

set_alpha_mask

Sets the alpha component color mask.


Statics:

get_mask_shift

Returns the shift of a color mask.

get_mask_bits

Returns the bit count of a color mask.

get_bitmask

Returns the color mask based on bit count and shift.

rgba8888

Pixel format with 32 bit depth, 8 bits per color mask.

argb8888

Pixel format with 32 bit depth, 8 bits per color mask.

rgb888

Pixel format with 24 bit depth, 8 bits per color mask, no alpha.

rgba4444

Pixel format with 16 bit depth, 4 bits per color mask.

rgb555

Pixel format with 16 bit depth, 5 bits per color mask, one bit unused.

rgb565

Pixel format with 16 bit depth, 5 bits for red and blue, 6 bits for green.

abgr8888

Pixel format with 32 bit depth, 8 bits per color mask.

bgr888

Pixel format with 24 bit depth, 8 bits per color mask, no alpha.

abgr4444

Pixel format with 16 bit depth, 4 bits per color mask.

bgr555

Pixel format with 16 bit depth, 5 bits per color mask, one bit unused.

bgr565

Pixel format with 16 bit depth, 5 bits for red and blue, 6 bits for green.