All Classes |Grouped Classes |Index

Class CL_PixelBuffer

Pixel data container. More...

Derived from:

None

Derived by:

None

Group:

Display (Display)

#include <ClanLib/display.h>

Class Members:

Construction:

CL_PixelBuffer

Constructs a null instance.


Attributes:

is_null

Returns true if this object is invalid.

throw_if_null

Throw an exception if this object is invalid.

copy

Create a copy of the pixelbuffer that doesn't share data the orl pixel ixel ixel buffer.

get_palette

Returns the palette of the pixel buffer.

get_width

Returns the buffer width.

get_height

Returns the buffer height.

get_size

Returns the width and height of the buffer.

get_pitch

Returns the pitch (bytes per scanline).

get_data

Returns a pointer to the beginning of the pixel buffer.

get_data_uint8

Returns a pointer to the beginning of the pixel buffer as 8 bit data.

get_data_uint16

Returns a pointer to the beginning of the pixel buffer as 16 bit data.

get_data_uint32

Returns a pointer to the beginning of the pixel buffer as 32 bit data.

get_line

Returns a pointer to the beginning of a specific line.

get_line_uint8

Returns a pointer to the beginning of a specific line as 8 bit data.

get_line_uint16

Returns a pointer to the beginning of a specific line as 16 bit data.

get_line_uint32

Returns a pointer to the beginning of a specific line as 32 bit data.

has_colorkey

Returns true if format uses a source color key.

get_colorkey

Returns the source color key.

get_bytes_per_pixel

Returns the number of bytes per pixel.

get_red_mask

Returns the red component color mask (if available)

get_green_mask

Returns the green component color mask (if available)

get_blue_mask

Returns the blue component color mask (if available)

get_alpha_mask

Returns the alpha component color mask (if available)

get_format

Returns the pixel format.

get_provider

Get Provider.

get_pixel

Return color of pixel at the specified coordinates.


Operations:

lock

Maps buffer into system memory.

unlock

Unmaps element buffer.

upload_data

Uploads data to buffer.

operator bool

Return true if the CL_PixelBuffer is valid and usable.

convert

Convert pixel buffer to the pixel format of the target buffer, storing the result in the target buffer.

to_format

Converts current buffer to a new pixel format and returns the result.

set_colorkey

Sets a new colorkey without converting the buffer.

flip_vertical

Flip the entire image vertically (turn it upside down)

premultiply_alpha

Mutiply the RGB components by the Alpha component.