wsp::Image Class Reference

Stores imagedata and is capable of loading pngs. More...

#include <image.h>

List of all members.

Public Member Functions

 Image ()
 Constructor.
 ~Image ()
 Destructor.
IMG_LOAD_ERROR LoadImage (const char *path)
u32 GetWidth () const
u32 GetHeight () const
bool IsInitialized () const
void BindTexture (bool bilinear=true)


Detailed Description

Stores imagedata and is capable of loading pngs.

Member Function Documentation

IMG_LOAD_ERROR wsp::Image::LoadImage ( const char *  path  ) 

Loads an image from a file. Width and height have to be a multiple of 4, or it won't load. Uses fopen(), so some basic filesystem initialization is required.

Parameters:
path The path to the file.
Returns:
An error code based on loading status.

u32 wsp::Image::GetWidth (  )  const

Gets the width of this image.

Returns:
The width of the image. Returns 0 if no image is loaded.

u32 wsp::Image::GetHeight (  )  const

Gets the height of this image.

Returns:
The height of the image. Returns 0 if no image is loaded.

bool wsp::Image::IsInitialized (  )  const

Checks if the image is loaded.

Returns:
true if an image is stored, false if not.

void wsp::Image::BindTexture ( bool  bilinear = true  ) 

Used to select this image for the next texturing process. Most of the time you won't gonna use this.

Parameters:
bilinear Turns on bilinear filtering.


The documentation for this class was generated from the following file:

Generated on Wed Jun 18 01:50:00 2008 for libwiisprite by  doxygen 1.5.5