CL_SurfaceProvider3
The image source interface.
Overview
This is the interface used by a surface to load an image. For more information about the relationship between a surface and its provider, please the CL_Surface class description.
The surface provider interface extends the renderer target interface with some blitting related functions. Currently, this is translation of the image and colorkey transparency.
ClanLib includes a large range of surface providers that can load an image from various sources: PCX, TGA, PNG and so on.
If you want to be able to load your (newly created) surface provider as a resource, you have to implement the CL_ResourceSource_Surface as well.
Inherited from public CL_Target
Class members
- static CL_SurfaceProvider *
load( -
const char *resource_id, CL_ResourceManager *manager)
- virtual
~CL_SurfaceProvider()
- virtual int
get_translate_x()
- virtual int
get_translate_y()
- virtual bool
uses_src_colorkey()
- virtual unsigned int
get_src_colorkey()
Members with descriptions
- static CL_SurfaceProvider *
load( -
const char *resource_id, CL_ResourceManager *manager)
Description:
This function loads a surface provider from a resource file (usually a datafile).
- virtual
~CL_SurfaceProvider() -
Description:
- virtual int
get_translate_x() -
Description:
Returns the offset of the surface_data returned by get_data(). This translation will be applied to every putscreen using a given surfaceproviders data as input.
Return value:
The x-offset of the surface data.
- virtual int
get_translate_y() -
Description:
Returns the offset of the surface_data returned by get_data(). This translation will be applied to every putscreen using a given surfaceproviders data as input.
Return value:
The y-offset of the surface data.
- virtual bool
uses_src_colorkey() -
Description:
Returns true if the surface provider uses a source color key.
- virtual unsigned int
get_src_colorkey() -
Description:
Returns the source color key.