|
| | image () |
| | Default constructor. More...
|
| |
| | image (u_int16 l, u_int16 h, const u_int8 &scale=1) |
| | Creates an image with a specified size. More...
|
| |
| | image (SDL_Surface *s, const SDL_Color &color) |
| | Create image from SDL_Surface. More...
|
| |
| virtual | ~image () |
| | Destructor. More...
|
| |
| void | resize (u_int16 l, u_int16 h) |
| | Resize this image. More...
|
| |
| void | clear () |
| | Resets the image to it's initial state, that is totally empty. More...
|
| |
|
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. More...
|
| |
| s_int8 | load (string fname) |
| | Loads an image from a file name, in game internal format, with alpha and mask values. More...
|
| |
| s_int8 | get_raw (igzstream &file) |
| | Loads an image from an opened file, saved in game internal format, without alpha and mask values. More...
|
| |
| s_int8 | load_raw (string fname) |
| | Loads an image from a file name, in game internal format, without alpha and mask values. More...
|
| |
| s_int8 | get_pnm (SDL_RWops *file) |
| | Loads an image from an opened file, in PNM format, without alpha and mask values. More...
|
| |
| s_int8 | load_pnm (string fname) |
| | Loads an image from a file name, in PNM format, without alpha and mask values. More...
|
| |
| s_int8 | put (ogzstream &file) const |
| | Saves an image into an opened file, in game format, with alpha and mask values. More...
|
| |
| s_int8 | save (string fname) const |
| | Saves an image into an file, in game format, with alpha and mask values. More...
|
| |
| s_int8 | put_raw (ogzstream &file) const |
| | Saves an image into an opened file, in game format, without alpha and mask values. More...
|
| |
| s_int8 | save_raw (string fname) const |
| | Saves an image into an file, in game format, without alpha and mask values. More...
|
| |
| s_int8 | put_pnm (SDL_RWops *file) const |
| | Saves an image into an opened file, in PNM format, without alpha and mask values. More...
|
| |
| s_int8 | save_pnm (string fname) const |
| | Saves an image into an file, in PNM format, without alpha and mask values. More...
|
| |
| | surface (const u_int8 &scale=1) |
| | Default constructor. More...
|
| |
| virtual | ~surface () |
| | Destructor. More...
|
| |
| bool | is_masked () const |
| | Returns whether a surface is masked or not. More...
|
| |
| void | set_mask (bool m) |
| | Sets the mask parameter of the surface. More...
|
| |
| u_int8 | alpha () const |
| | Returns the alpha value of the surface. More...
|
| |
| void | set_alpha (u_int8 a, const bool &alpha_channel=false) |
| | Sets the alpha value of the surface. More...
|
| |
| bool | has_alpha_channel () const |
| | Returns whether the surface has an alpha channel. More...
|
| |
| u_int8 | scale () const |
| | Get the surfaces current scaling factor. More...
|
| |
| void | set_scale (const u_int8 &scale) |
| | Change the scale of the surface to the given value, resizing the internal texture appropriately. More...
|
| |
| void | draw (s_int16 x, s_int16 y, const drawing_area *da_opt=NULL, surface *target=NULL) const |
| | Draw the surface. More...
|
| |
| void | draw (s_int16 x, s_int16 y, s_int16 sx, s_int16 sy, u_int16 sl, u_int16 sh, const drawing_area *da_opt=NULL, surface *target=NULL) const |
| | Draw a part of the surface. More...
|
| |
| void | draw_part (s_int16 x, s_int16 y, s_int16 sx, s_int16 sy, u_int16 sl, u_int16 sh, const drawing_area *da_opt=NULL, surface *target=NULL) const |
| | Synonym of draw () to guarantee its access from Python. More...
|
| |
| void | fillrect (s_int16 x, s_int16 y, u_int16 l, u_int16 h, u_int32 col, drawing_area *da_opt=NULL) |
| | Fills an area of the surface with a given color. More...
|
| |
|
u_int32 | map_color (const u_int8 &r, const u_int8 &g, const u_int8 &b, const u_int8 &a=255) const |
| |
|
void | unmap_color (u_int32 col, u_int8 &r, u_int8 &g, u_int8 &b, u_int8 &a) const |
| |
| void | lock () const |
| | Locks the surface. More...
|
| |
| void | unlock () const |
| | Unlock the surface after you've worked on it's pixels with the get_pix () and put_pix () methods. More...
|
| |
| void | put_pix (u_int16 x, u_int16 y, u_int32 col) |
| | Puts a pixel of a given color. More...
|
| |
| void | put_pix (u_int16 x, u_int16 y, u_int8 r, u_int8 g, u_int8 b) |
| | Puts a pixel of a given color. More...
|
| |
| void | put_pix_rgb (u_int16 x, u_int16 y, u_int8 r, u_int8 g, u_int8 b) |
| | Synonym of put_pix () to guarantee its access from Python. More...
|
| |
| u_int32 | get_pix (u_int16 x, u_int16 y) const |
| | Gets a pixel from the surface. More...
|
| |
| void | get_pix (u_int16 x, u_int16 y, u_int8 &r, u_int8 &g, u_int8 &b) const |
| | Gets a pixel from a surface. More...
|
| |
| void | get_pix_rgb (u_int16 x, u_int16 y, u_int8 r, u_int8 g, u_int8 b) const |
| | Synonym of get_pix () to guarantee its access from Python. More...
|
| |
| surface & | operator= (const surface &src) |
| | Surface copy (similar to copy ()). More...
|
| |
| void | copy (const surface &src) |
| | Synonym of operator = to guarantee its access from Python. More...
|
| |
| | drawable () |
| | Default constructor. More...
|
| |
| virtual | ~drawable () |
| | Destructor. More...
|
| |
| u_int16 | length () const |
| | Returns the length of the drawable. More...
|
| |
| u_int16 | height () const |
| | Returns the height of the drawable. More...
|
| |
| virtual bool | update () |
| | Virtual update function, provided for objects which doesn't need one. More...
|
| |
| virtual bool | input_update () |
| | Virtual input update function, provided for objects which doesn't need one. More...
|
| |
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 45 of file image.h.