SdlFileSurface Class Reference
[SDL based classes]

A class for a graphical surface resource, loaded from a file. More...

#include <sdlfilesurface.h>

Inheritance diagram for SdlFileSurface:

Inheritance graph
[legend]
Collaboration diagram for SdlFileSurface:

Collaboration graph
[legend]
List of all members.

Public Member Functions

DECLSPEC SdlFileSurface (const char *fn, const char *name=0, Uint32 colorkey=RGB(0, 0, 0), char *type=0, Uint32 flags=SDL_HWSURFACE)

Protected Member Functions

virtual DECLSPEC void onRefresh ()

Detailed Description

A class for a graphical surface resource, loaded from a file.

The class supports the initialisation by specifying a file of one of the following formats:
BMP, JPG, PNG, TIF, PCX, TGA, PNM, XPM, XCF and LBM.


Constructor & Destructor Documentation

SdlFileSurface::SdlFileSurface ( const char *  fn,
const char *  name = 0,
Uint32  colorkey = RGB(0, 0, 0),
char *  type = 0,
Uint32  flags = SDL_HWSURFACE 
)

Constructor. Registers itself in SdlManager with the given name or, if name is NULL, with the given filename. After the construction, a surface buffer, initialized with the data of the given filename, the colorkey and flags is availible for usage. If initialisation failed, the fail-state is set.

Parameters:
fn the filename of the image file
name the resource's name
colorkey the color, that is fully transparent when blitting
type the type of the image file as string with 3 letters (as listed above); if NULL, the ending of the filename is used to detect the type
flags the flags of the surface, for details, have a look at the SDL documentation; usually SDL_HWSURFACE is the best value.
See also:
SdlManager::getSurfaceByName()


Member Function Documentation

void SdlFileSurface::onRefresh (  )  [protected, virtual]

Refreshes the surface, by loading the buffer from the computer's RAM to the graphical RAM, if SDL_HWSURFACE used. This is neccessary, when resoring an application in MS Windows

Todo:
test this (I think it does not function yet) and make it working.

Reimplemented from SdlSurface.


The documentation for this class was generated from the following files:
Generated on Wed May 9 17:36:33 2007 for netrinjo by  doxygen 1.5.1