CL_PixelBufferRef Class Reference
[clanDisplay Display]

Pixel data reference class. More...

#include <pixel_buffer.h>

List of all members.

Operations

CL_PixelBufferRef get_subimage (const CL_Rect &rect) const
 Get subimage.
CL_PixelBuffer copy () const
 Create a copy of the pixelbuffer that doesn't share data with the original pixel buffer.
void convert (CL_PixelBuffer target) const
 Convert pixel buffer to the pixel format of the target buffer, storing the result in the target buffer.
void convert (void *buffer, const CL_PixelFormat &format, int dest_pitch, const CL_Rect &dest_rect, const CL_Rect &src_rect=CL_Rect(0, 0, 0, 0)) const
void convert_line (void *buffer, const CL_PixelFormat &format, int y) const
 Convert one line of pixel data to target buffer.
CL_PixelBuffer to_format (const CL_PixelFormat &format) const
 Converts current buffer to a new pixel format and returns the result.

Public Member Functions

Construction
 CL_PixelBufferRef ()
 Constructs a pixel buffer.
 CL_PixelBufferRef (const CL_PixelBuffer &buffer)
 Constructs a PixelBufferRef.
 CL_PixelBufferRef (int width, int height, int pitch, const CL_PixelFormat &format, const void *data)
 Constructs a PixelBufferRef.
 CL_PixelBufferRef (int width, int height, int pitch, const CL_PixelFormat &format, const CL_Palette *palette, const void *data)
 Constructs a PixelBufferRef.
Attributes
const CL_PixelFormatget_format () const
 Returns the pixel format of the pixel buffer.
const CL_Paletteget_palette () const
 Returns the palette of the pixel buffer.
int get_width () const
 Returns the buffer width.
int get_height () const
 Returns the buffer height.
CL_Size get_size () const
 Returns the width and height of the buffer.
unsigned int get_pitch () const
 Returns the pitch (bytes per scanline).
void * get_data ()
 Returns a pointer to the beginning of the pixel buffer.
const void * get_data () const


Detailed Description

Pixel data reference class.


Constructor & Destructor Documentation

CL_PixelBufferRef::CL_PixelBufferRef  ) 
 

Constructs a pixel buffer.

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.

CL_PixelBufferRef::CL_PixelBufferRef const CL_PixelBuffer buffer  ) 
 

Constructs a PixelBufferRef.

Parameters:
buffer = Pixel Buffer

CL_PixelBufferRef::CL_PixelBufferRef int  width,
int  height,
int  pitch,
const CL_PixelFormat format,
const void *  data
 

Constructs a PixelBufferRef.

Parameters:
width = value
height = value
pitch = value
format = Pixel Format
data = void

CL_PixelBufferRef::CL_PixelBufferRef int  width,
int  height,
int  pitch,
const CL_PixelFormat format,
const CL_Palette palette,
const void *  data
 

Constructs a PixelBufferRef.

Parameters:
width = value
height = value
pitch = value
format = Pixel Format
palette = Palette
data = void


Member Function Documentation

void CL_PixelBufferRef::convert void *  buffer,
const CL_PixelFormat format,
int  dest_pitch,
const CL_Rect dest_rect,
const CL_Rect src_rect = CL_Rect(0, 0, 0, 0)
const
 

void CL_PixelBufferRef::convert CL_PixelBuffer  target  )  const
 

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

Parameters:
target Target pixel buffer.
buffer Buffer getting stored pixels in the specified format and pitch.
format Pixel format of target buffer.
dest_pitch Bytes per line of target buffer.
dest_rect Destination rectangle for conversion.
src_rect Source rectangle for conversion.

void CL_PixelBufferRef::convert_line void *  buffer,
const CL_PixelFormat format,
int  y
const
 

Convert one line of pixel data to target buffer.

Parameters:
buffer Buffer getting stored pixels in the specified format
format Pixel format of target buffer.
y Specifies which line to convert when converting one single line.

CL_PixelBuffer CL_PixelBufferRef::copy  )  const
 

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

const void* CL_PixelBufferRef::get_data  )  const [inline]
 

void* CL_PixelBufferRef::get_data  )  [inline]
 

Returns a pointer to the beginning of the pixel buffer.

const CL_PixelFormat& CL_PixelBufferRef::get_format  )  const [inline]
 

Returns the pixel format of the pixel buffer.

int CL_PixelBufferRef::get_height  )  const [inline]
 

Returns the buffer height.

const CL_Palette* CL_PixelBufferRef::get_palette  )  const [inline]
 

Returns the palette of the pixel buffer.

unsigned int CL_PixelBufferRef::get_pitch  )  const [inline]
 

Returns the pitch (bytes per scanline).

CL_Size CL_PixelBufferRef::get_size  )  const [inline]
 

Returns the width and height of the buffer.

CL_PixelBufferRef CL_PixelBufferRef::get_subimage const CL_Rect rect  )  const
 

Get subimage.

Parameters:
rect = Rect
Returns:
Pixel Buffer Ref

int CL_PixelBufferRef::get_width  )  const [inline]
 

Returns the buffer width.

CL_PixelBuffer CL_PixelBufferRef::to_format const CL_PixelFormat format  )  const
 

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


The documentation for this class was generated from the following file:
Generated on Thu Dec 3 02:39:39 2009 for ClanLib by  doxygen 1.4.6