This class is used to draw (blit/put screen) images to the screen. The actual image is provided by a CL_SurfaceProvider.
Description
To create a surface, you can call the create() function:
CL_Surface *surf = CL_Surface::create(
new CL_PCXProvider("image.pcx", NULL),
true);
However, in pratice you normally do not do it this way because the surface
provider has a static create function as well. Its purpose is only to
save you from some typing. The code below does exactly the same:
CL_Surface *surf = CL_PCXProvider::create("image.pcx", NULL);
Please note, that surfaces can also be loaded from resource files. If you
want to do that, have a look on the CL_ResourceManager class.
Class members
static CL_Surface *create(
CL_SurfaceProvider *provider,
bool delete_provider=false)
virtual void reload()
virtual CL_SurfaceProvider *get_provider()
virtual void put_screen(
int x,
int y,
int spr_no=0,
CL_DisplayCard *card=NULL)
virtual void put_screen(
int x,
int y,
float scale_x,
float scale_y,
int spr_no=0,
CL_DisplayCard *card=NULL)
virtual void put_screen(
int x,
int y,
int size_x,
int size_y,
int spr_no=0,
CL_DisplayCard *card=NULL)
virtual int get_width()
virtual int get_height()
virtual int get_no_sprs()
virtual bool is_video(CL_DisplayCard *card = NULL)
virtual bool is_loaded(CL_DisplayCard *card = NULL)
virtual bool convert_video(CL_DisplayCard *card = NULL)
virtual bool convert_system(CL_DisplayCard *card = NULL)
virtual void flush(CL_DisplayCard *card = NULL)
See Also
CL_SurfaceProvider | - | The SurfaceProvider interface. |
CL_ResourceManager | - | Resources in ClanLib. |
Back to index
|