Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

CL_Canvas Class Reference

clanDisplay="Surface Providers". More...

#include <canvas.h>

Inheritance diagram for CL_Canvas:

Inheritance graph
[legend]
Collaboration diagram for CL_Canvas:

Collaboration graph
[legend]
List of all members.

Public Methods

 CL_Canvas (int width, int height, int no_sprs=1, int red_mask=0xff000000, int green_mask=0x00ff0000, int blue_mask=0x0000ff00, int alpha_mask=0x000000ff, bool use_transcol=false, unsigned int transcol=0)
 param: width - the width of the surface to be createdparam: height - the height of the surface to be createdparam: no_sprs - the number of sprites the surface will haveparam: red_mask - the bit mask for redparam: blue_mask - the bit mask for blueparam: green_mask - the bit mask for greenparam: alpha_mask - the bit mask for the alpha param: use_transcol - whether the surface should use source key transparancyparam: transcol - the (optional) source key color.

virtual ~CL_Canvas ()
 param: width - the width of the surface to be createdparam: height - the height of the surface to be createdparam: no_sprs - the number of sprites the surface will haveparam: red_mask - the bit mask for redparam: blue_mask - the bit mask for blueparam: green_mask - the bit mask for greenparam: alpha_mask - the bit mask for the alpha param: use_transcol - whether the surface should use source key transparancyparam: transcol - the (optional) source key color.

virtual unsigned int get_width () const
virtual unsigned int get_height () const
virtual unsigned int get_num_frames () const
 retval: A pointer that points to the beginning of the target pixel data.

virtual unsigned int get_red_mask () const
virtual unsigned int get_green_mask () const
virtual unsigned int get_blue_mask () const
virtual unsigned int get_alpha_mask () const
virtual unsigned int get_pitch () const
virtual bool is_indexed () const
virtual void set_palette (CL_Palette *palette)
virtual CL_Paletteget_palette () const
virtual void set_src_colorkey (unsigned int transcol)
virtual bool uses_src_colorkey () const
 retval: The y-offset of the surface data.

virtual unsigned int get_src_colorkey () const
virtual void* get_data () const
virtual void lock ()
 retval: True if stored in video memory, false otherwise.

virtual void unlock ()

Static Public Methods

CL_Surfacecreate (int width, int height, int no_sprs=1, int red_mask=0xff000000, int green_mask=0x00ff0000, int blue_mask=0x0000ff00, int alpha_mask=0x000000ff, bool use_transcol=false, unsigned int transcol=0)

Private Attributes

int width
int height
int no_sprs
int transcol
int red_mask
int green_mask
int blue_mask
int alpha_mask
EPixelFormat pixelformat
unsigned char* data
int bpp
bool use_transcol

Detailed Description

clanDisplay="Surface Providers".

Definition at line 27 of file canvas.h.


Constructor & Destructor Documentation

CL_Canvas::CL_Canvas ( int width,
int height,
int no_sprs = 1,
int red_mask = 0xff000000,
int green_mask = 0x00ff0000,
int blue_mask = 0x0000ff00,
int alpha_mask = 0x000000ff,
bool use_transcol = false,
unsigned int transcol = 0 ) [inline]
 

param: width - the width of the surface to be createdparam: height - the height of the surface to be createdparam: no_sprs - the number of sprites the surface will haveparam: red_mask - the bit mask for redparam: blue_mask - the bit mask for blueparam: green_mask - the bit mask for greenparam: alpha_mask - the bit mask for the alpha param: use_transcol - whether the surface should use source key transparancyparam: transcol - the (optional) source key color.

Definition at line 87 of file canvas.h.

Referenced by create().

CL_Canvas::~CL_Canvas ( ) [inline, virtual]
 

param: width - the width of the surface to be createdparam: height - the height of the surface to be createdparam: no_sprs - the number of sprites the surface will haveparam: red_mask - the bit mask for redparam: blue_mask - the bit mask for blueparam: green_mask - the bit mask for greenparam: alpha_mask - the bit mask for the alpha param: use_transcol - whether the surface should use source key transparancyparam: transcol - the (optional) source key color.

Definition at line 126 of file canvas.h.


Member Function Documentation

CL_Surface* CL_Canvas::create ( int width,
int height,
int no_sprs = 1,
int red_mask = 0xff000000,
int green_mask = 0x00ff0000,
int blue_mask = 0x0000ff00,
int alpha_mask = 0x000000ff,
bool use_transcol = false,
unsigned int transcol = 0 ) [inline, static]
 

Definition at line 51 of file canvas.h.

Referenced by toluaI_CL_Canvas_create0().

unsigned int CL_Canvas::get_alpha_mask ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 152 of file canvas.h.

Referenced by toluaI_CL_Canvas_get_alpha_mask0().

unsigned int CL_Canvas::get_blue_mask ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 149 of file canvas.h.

Referenced by toluaI_CL_Canvas_get_blue_mask0().

void * CL_Canvas::get_data ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 177 of file canvas.h.

Referenced by toluaI_CL_Canvas_get_data0().

unsigned int CL_Canvas::get_green_mask ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 146 of file canvas.h.

Referenced by toluaI_CL_Canvas_get_green_mask0().

unsigned int CL_Canvas::get_height ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 137 of file canvas.h.

Referenced by toluaI_CL_Canvas_get_height0().

unsigned int CL_Canvas::get_num_frames ( ) const [inline, virtual]
 

retval: A pointer that points to the beginning of the target pixel data.

Reimplemented from CL_Target.

Definition at line 140 of file canvas.h.

Referenced by toluaI_CL_Canvas_get_num_frames0().

CL_Palette * CL_Canvas::get_palette ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 166 of file canvas.h.

Referenced by toluaI_CL_Canvas_get_palette0().

unsigned int CL_Canvas::get_pitch ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 155 of file canvas.h.

Referenced by toluaI_CL_Canvas_get_pitch0().

unsigned int CL_Canvas::get_red_mask ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 143 of file canvas.h.

Referenced by toluaI_CL_Canvas_get_red_mask0().

unsigned int CL_Canvas::get_src_colorkey ( ) const [inline, virtual]
 

Reimplemented from CL_SurfaceProvider.

Definition at line 174 of file canvas.h.

Referenced by toluaI_CL_Canvas_get_src_colorkey0().

unsigned int CL_Canvas::get_width ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 134 of file canvas.h.

Referenced by toluaI_CL_Canvas_get_width0().

bool CL_Canvas::is_indexed ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 158 of file canvas.h.

Referenced by toluaI_CL_Canvas_is_indexed0().

void CL_Canvas::lock ( ) [inline, virtual]
 

retval: True if stored in video memory, false otherwise.

Reimplemented from CL_Target.

Definition at line 182 of file canvas.h.

Referenced by toluaI_CL_Canvas_lock0().

void CL_Canvas::set_palette ( CL_Palette * palette ) [inline, virtual]
 

Definition at line 163 of file canvas.h.

Referenced by toluaI_CL_Canvas_set_palette0().

void CL_Canvas::set_src_colorkey ( unsigned int transcol ) [inline, virtual]
 

Definition at line 170 of file canvas.h.

Referenced by toluaI_CL_Canvas_set_src_colorkey0().

void CL_Canvas::unlock ( ) [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 186 of file canvas.h.

Referenced by toluaI_CL_Canvas_unlock0().

bool CL_Canvas::uses_src_colorkey ( ) const [inline, virtual]
 

retval: The y-offset of the surface data.

Reimplemented from CL_SurfaceProvider.

Definition at line 173 of file canvas.h.

Referenced by toluaI_CL_Canvas_uses_src_colorkey0().


Member Data Documentation

int CL_Canvas::alpha_mask [private]
 

Definition at line 194 of file canvas.h.

int CL_Canvas::blue_mask [private]
 

Definition at line 194 of file canvas.h.

int CL_Canvas::bpp [private]
 

Definition at line 197 of file canvas.h.

unsigned char* CL_Canvas::data [private]
 

Definition at line 196 of file canvas.h.

int CL_Canvas::green_mask [private]
 

Definition at line 194 of file canvas.h.

int CL_Canvas::height [private]
 

Definition at line 193 of file canvas.h.

int CL_Canvas::no_sprs [private]
 

Definition at line 193 of file canvas.h.

EPixelFormat CL_Canvas::pixelformat [private]
 

Definition at line 195 of file canvas.h.

int CL_Canvas::red_mask [private]
 

Definition at line 194 of file canvas.h.

int CL_Canvas::transcol [private]
 

Definition at line 193 of file canvas.h.

bool CL_Canvas::use_transcol [private]
 

Definition at line 198 of file canvas.h.

int CL_Canvas::width [private]
 

Definition at line 193 of file canvas.h.


The documentation for this class was generated from the following file:
Generated at Wed Apr 4 19:56:42 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001