Empty surfaceprovider to be used as a rendering target.
Parents: public CL_SurfaceProvider
Description
CL_Canvas is a surface provider useful to create images at
run-time.
When constructed, the surface provider will contain an empty image
buffer of the specified dimensions. It is then the intention that the
game fills the buffer with data.
There are three ways to do this (and you can mix them as you
please):
- Lock() the provider, and then call get_data() to get a pointer to the
image buffer. Party on it. And then finally unlock() the provider.
- Use the drawing primitives available in CL_Target. This includes line
drawing, fill rects and clipping.
- Use the put_target() function in CL_Surface (create the image from
other surfaces).
Class members
static CL_Surface *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)
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)
virtual ~CL_Canvas()
virtual unsigned int get_width()
virtual unsigned int get_height()
virtual unsigned int get_num_frames()
virtual unsigned int get_red_mask()
virtual unsigned int get_green_mask()
virtual unsigned int get_blue_mask()
virtual unsigned int get_alpha_mask()
virtual unsigned int get_pitch()
virtual bool is_indexed()
virtual void set_palette(CL_Palette* palette)
virtual CL_Palette *get_palette()
virtual void set_src_colorkey(unsigned int transcol)
virtual bool uses_src_colorkey()
virtual unsigned int get_src_colorkey()
virtual void *get_data()
virtual void lock()
virtual void unlock()
See Also
None
Back to index
|