#include <sdlmm_surface.h>
Inheritance diagram for SDLmm::Surface::
Public Methods | |
Surface (SDL_Surface *surface) | |
Constructor from an SDL_Surface*. More... | |
Surface (const Surface &other) | |
Surface () | |
Create an uninitialized surface. More... | |
Surface& | operator= (const Surface &other) |
Implementation of operator=. More... | |
Surface | Duplicate () const |
virtual bool | SetDisplayFormat () |
Convert the surface to the display format. More... | |
virtual bool | SetDisplayFormatAlpha () |
Convert the surface to the display format. More... | |
Static Public Methods | |
Surface | CreateSurface (const BaseSurface &other) |
Surface | CreateSurface (Uint32 flags, int w, int h, int d, Uint32 Rmask=0, Uint32 Gmask=0, Uint32 Bmask=0, Uint32 Amask=0) |
Allocate an empty RGB surface. More... | |
Surface | CreateSurface (void *pixels, int w, int h, int d, int p, Uint32 Rmask=0, Uint32 Gmask=0, Uint32 Bmask=0, Uint32 Amask=0) |
Create a new Surface from the provided pixel data. More... | |
Surface | LoadBMP (const char *file) |
Loads a Windows BMP and returns it as a new Surface. More... | |
Surface | LoadBMP (const std::string &file) |
Loads a Windows BMP and returns a new Surface. More... |
Surfaces represent areas of "graphical" memory, memory that can be drawn to or blitted onto other Surfaces.
Definition at line 41 of file sdlmm_surface.h.
|
Constructor from an SDL_Surface*. This creates a new Surface object from an existing SDL_Surface. It's very important not to free the original surface since that will cause a problem when the object is destructed (SDL_Surface storage freed twice). Use with caution. Definition at line 51 of file sdlmm_surface.h. |
|
Definition at line 55 of file sdlmm_surface.h. |
|
Create an uninitialized surface.
Definition at line 68 of file sdlmm_surface.h. Referenced by CreateSurface(), and LoadBMP().
|
|
Create a new Surface from the provided pixel data. The data stored in pixels is assumed to be of the depth specified in the parameter d. The pixel data is not copied into the SDL_Surface structure me so it should no be freed until the Surface object has been destructed
Definition at line 134 of file sdlmm_surface.h. |
|
Allocate an empty RGB surface. If depth is 8 bits an empty palette is allocated for the surface, otherwise a 'packed-pixel' SDL_PixelFormat is created using the [RGBA]mask's provided. The flags specifies
Definition at line 110 of file sdlmm_surface.h. |
|
Definition at line 84 of file sdlmm_surface.h. Referenced by Duplicate().
|
|
Definition at line 78 of file sdlmm_surface.h. |
|
Loads a Windows BMP and returns a new Surface.
Definition at line 170 of file sdlmm_surface.h. |
|
Loads a Windows BMP and returns it as a new Surface. If the image couldn't be loaded, the Surface will be invalid. You can check the success of the image loading using the Surface.valid() method like the example code below. SDLmm::Surface img(SDLmm::Surface::LoadBMP("myimage.bmp")); if(!img.valid()) { cerr << "Loading of image myimage.bmp failed!\n"; exit(1); }
Definition at line 161 of file sdlmm_surface.h. Referenced by LoadBMP().
|
|
Convert the surface to the display format. This function converts the surface to the pixel format and colors of the video framebuffer, making it suitable for fast blitting onto the display surface. If you want to take advantage of hardware colorkey or alpha blit acceleration, you should set the colorkey and alpha value before calling this function.
Reimplemented from SDLmm::BaseSurface. Definition at line 30 of file sdlmm_surface.cpp. |
|
Convert the surface to the display format. This function converts the surface to the pixel format and colors of the video framebuffer plus an alpha channel, making it suitable for fast blitting onto the display surface. If you want to take advantage of hardware colorkey or alpha blit acceleration, you should set the colorkey and alpha value before calling this function.
Reimplemented from SDLmm::BaseSurface. Definition at line 37 of file sdlmm_surface.cpp. |
|
Implementation of operator=.
Definition at line 71 of file sdlmm_surface.h. |
Documentation automatically generated by written by Dimitri van Heesch. | Project hosted at |