Home | All Classes | Grouped Classes | Index | Search

CL_PixelBuffer::CL_PixelBuffer

Constructs a pixel buffer.

	CL_PixelBuffer(
		int width, int height, int pitch, const CL_PixelFormat& format, void* data = 0);

	CL_PixelBuffer(
		int width, int height, int pitch, const CL_PixelFormat& format, const CL_Palette& palette, void* data = 0);

	CL_PixelBuffer(
		const CL_PixelBuffer& copy);

	CL_PixelBuffer();

	CL_PixelBuffer(
		CL_PixelBuffer_Generic* impl);

Parameters:

width
Width of pixel buffer, in pixels.
height
Height of pixel buffer, in pixels.
pitch
Bytes per line in pixel buffer.
format
Pixel format of pixel buffer.
palette
Palette used in pixel buffer.
data
Data pointer to pixel data. If null, will construct a memory pixel buffer with the given dimensions.

Detailed description:

If the data pointer is not null, it will internally just point at the memory location specified by data. In other words, CL_PixelBuffer do not copy the data, and it does not delete the data pointer when destroyed itself.

See also:

CL_Palette | CL_PixelBuffer | CL_PixelFormat



Questions or comments, write to the ClanLib mailing list.