Home | All Classes | Grouped Classes | Index | Search

Class CL_PixelBuffer

Pixel data access. More...

Derived from: none
Derived by: CL_BMPProvider CL_DeviceContextBuffer CL_JPEGProvider CL_PCXProvider CL_PNGProvider CL_TargaProvider
Group: Display (Display 2D)

#include <ClanLib/display.h>

Construction:

CL_PixelBuffer

Constructs a pixel buffer.

Attributes:

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_pitch

Returns the pitch (bytes per scanline).

get_data

Returns a pointer to the beginning of the pixel buffer. Pointer is only valid inside a lock/unlock session.

get_pixel

Returns the pixel at coordinates x and y. Only valid within a lock/unlock session.

Operations:

operator =

Copy assignment operator.

bool

Return true if the CL_PixelBuffer is valid and useable

lock

Locks the pixel buffer, making calls to get_data() valid.

unlock

Unlocks the pixelbuffer.

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. Only valid within a lock/unlock session.

Implementation:

impl

Pixel data implementation.

Detailed description:

!group=Display/Display 2D! !header=display.h!


Questions or comments, write to the
ClanLib mailing list.