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 pixel buffer.


Attributes:

is_null

Returns true if the PixelBuffer doesn't contain any data.

copy

Create a copy of the pixelbuffer that doesn't share data with the original pixel buffer.

get_format

Returns the pixel format of the pixel 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_pixel

Returns the pixel at coordinates x and y.

get_subimage

Returns a new pixel buffer, copying the area specified by rect.


Operations:

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.

convert_line

Convert one line of pixel data to 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.

draw_pixel

Draw a pixel at (x, y) using the specified color.

flip_vertical

Flip the entire image vertically (turn it upside down).