Public Member Functions |
| image () |
| Default constructor.
|
| image (u_int16 l, u_int16 h, bool mode=true) |
| Creates an image with a specified size.
|
| image (SDL_Surface *s, const SDL_Color &color) |
| Create image from SDL_Surface.
|
| ~image () |
| Destructor.
|
void | resize (u_int16 l, u_int16 h) |
| Resize this image.
|
void | clear () |
| Resets the image to it's initial state, that is totally empty.
|
image & | operator= (const image &src) |
| Image copy (similar to copy ()).
|
void | copy (const image &src) |
| Synonym of operator = to guarantee its access from Python.
|
|
These methods allows you to load and save an image in different formats.
|
s_int8 | get (igzstream &file) |
| Loads an image from an opened file, saved in game internal format, with alpha and mask values.
|
s_int8 | load (string fname) |
| Loads an image from a file name, in game internal format, with alpha and mask values.
|
s_int8 | get_raw (igzstream &file) |
| Loads an image from an opened file, saved in game internal format, without alpha and mask values.
|
s_int8 | load_raw (string fname) |
| Loads an image from a file name, in game internal format, without alpha and mask values.
|
s_int8 | get_pnm (SDL_RWops *file) |
| Loads an image from an opened file, in PNM format, without alpha and mask values.
|
s_int8 | load_pnm (string fname) |
| Loads an image from a file name, in PNM format, without alpha and mask values.
|
s_int8 | put (ogzstream &file) const |
| Saves an image into an opened file, in game format, with alpha and mask values.
|
s_int8 | save (string fname) const |
| Saves an image into an file, in game format, with alpha and mask values.
|
s_int8 | put_raw (ogzstream &file) const |
| Saves an image into an opened file, in game format, without alpha and mask values.
|
s_int8 | save_raw (string fname) const |
| Saves an image into an file, in game format, without alpha and mask values.
|
s_int8 | put_pnm (SDL_RWops *file) const |
| Saves an image into an opened file, in PNM format, without alpha and mask values.
|
s_int8 | save_pnm (string fname) const |
| Saves an image into an file, in PNM format, without alpha and mask values.
|
|
Allows you to put fantasy in your image manipulations! Can eventually even be usefull...
|
void | zoom (const surface &src) |
| Zooms a surface.
|
void | zoom (const surface &src, u_int16 l, u_int16 h, u_int16 x=0, u_int16 y=0) |
| Zooms a surface.
|
void | zoom_to (const surface &src, u_int16 l, u_int16 h, u_int16 x=0, u_int16 y=0) |
| Synonym of zoom () to guarantee its access from Python.
|
void | tile (const surface &src) |
| Tiles a surface.
|
void | tile (const surface &src, u_int16 l, u_int16 h, u_int16 x=0, u_int16 y=0) |
| Tiles a surface.
|
void | tile_to (const surface &src, u_int16 l, u_int16 h, u_int16 x=0, u_int16 y=0) |
| Synonym of tile () to guarantee its access from Python.
|
void | brightness (const surface &src, u_int8 cont, bool proceed_mask=false) |
| Applies a "brightness" to a surface.
|
Image manipulation class.
Designed to work with single images, without having to care about the bit depth. This class is widely used through the game - in fact it handles everything that is displayed on the screen. This class highly relies on surface, so you'll probably want to have a look at it before using image.
Definition at line 41 of file image.h.