ClanSoft logo
ClanSoft logo

    CL_EmptySurfaceProvider

Empty/canvas surface provider.

Parents: public CL_SurfaceProvider_Generic

Description

Its usefull for the creation of static surface at runtime (for example gradients, etc.). It is not intendend to be used for dynamic surfaces (ie which will be regenerated every frame). To create a surface, first create a new EmptySurfaceProvider, than lock() the provider, write your data to the pointer returned by get_surface_data(), unlock() the provider and call CL_Surface::create(provider) to generate a the surface.

Class members

static CL_Surface *create(
        int width,
        int height,
        int no_sprs,
        int trans_col = -1,
        EPixelFormat pixelformat=PAL8)
CL_EmptySurfaceProvider( int _width, int _height, int _no_sprs, int _trans_col, EPixelFormat type=PAL8)
virtual ~CL_EmptySurfaceProvider()
virtual int get_width()
virtual int get_height()
virtual int get_no_sprs()
virtual EPixelFormat get_pixel_format()
virtual CL_Palette *get_palette()
virtual int get_transcol()
virtual void *get_surface_data()
virtual void perform_lock()
virtual void perform_unlock()

See Also

CL_Surface-putting/blitting images to the screen
CL_LockableSurfaces-Creating 100% dynamic surfaces

Back to index



This page was built using the Perceps documentation system.