ManaPlus
|
#include <sdlimagehelper.h>
Public Member Functions | |
SDLImageHelper () | |
Image * | load (SDL_RWops *const rw, Dye const &dye) |
Image * | loadSurface (SDL_Surface *const tmpImage) |
Image * | createTextSurface (SDL_Surface *const tmpImage, const int width, const int height, const float alpha) |
void | copySurfaceToImage (const Image *const image, const int x, const int y, SDL_Surface *const surface) const |
Public Member Functions inherited from ImageHelper | |
virtual | ~ImageHelper () |
Image * | load (SDL_RWops *const rw) |
virtual Image * | createTextSurface (SDL_Surface *const tmpImage, const int width, const int height, const float alpha) const |
virtual SDL_Surface * | create32BitSurface (int width, int height) const |
virtual RenderType | useOpenGL () const |
virtual void | postInit () |
Static Public Member Functions | |
static void | SDLSetEnableAlphaCache (const bool n) |
static bool | SDLGetEnableAlphaCache () |
static SDL_Surface * | SDLDuplicateSurface (SDL_Surface *const tmpImage) |
static int | combineSurface (SDL_Surface *const src, SDL_Rect *const srcrect, SDL_Surface *const dst, SDL_Rect *const dstrect) |
Static Public Member Functions inherited from ImageHelper | |
static SDL_Surface * | convertTo32Bit (SDL_Surface *const tmpImage) |
static void | dumpSurfaceFormat (const SDL_Surface *const image) |
static void | setEnableAlpha (const bool n) |
static SDL_Surface * | loadPng (SDL_RWops *const rw) |
static void | setOpenGlMode (const RenderType useOpenGL) |
Static Protected Member Functions | |
static Image * | _SDLload (SDL_Surface *tmpImage) |
Static Protected Attributes | |
static bool | mEnableAlphaCache = false |
Static Protected Attributes inherited from ImageHelper | |
static bool | mEnableAlpha = true |
static RenderType | mUseOpenGL = RENDER_SOFTWARE |
Friends | |
class | Image |
Additional Inherited Members | |
Protected Member Functions inherited from ImageHelper | |
ImageHelper () | |
Defines a class for loading and storing images.
Definition at line 43 of file sdlimagehelper.h.
|
inline |
Definition at line 48 of file sdlimagehelper.h.
|
staticprotected |
SDL_Surface to SDL_Surface Image loader
Definition at line 218 of file sdlimagehelper.cpp.
References ImageHelper::convertTo32Bit(), ifconstexpr, Image, MSDL_DisplayFormat, MSDL_DisplayFormatAlpha, MSDL_FreeSurface, and reportAlways.
Referenced by loadSurface().
|
static |
Definition at line 310 of file sdlimagehelper.cpp.
References SDLgfxBlitRGBA().
|
virtual |
Image * SDLImageHelper::createTextSurface | ( | SDL_Surface *const | tmpImage, |
const int | width, | ||
const int | height, | ||
const float | alpha | ||
) |
Definition at line 142 of file sdlimagehelper.cpp.
References CAST_U8, Image, MSDL_DisplayFormat, MSDL_DisplayFormatAlpha, and reportAlways.
Loads an image from an SDL_RWops structure and recolors it.
rw | The SDL_RWops to load the image from. |
dye | The dye used to recolor the image. |
NULL
if an error occurred, a valid pointer otherwise. < Surface is in system memory
Reimplemented from ImageHelper.
Definition at line 55 of file sdlimagehelper.cpp.
References DYEPALETTEP, Dye::getAPalete(), Dye::getSPalete(), Dye::getType(), ImageHelper::loadPng(), loadSurface(), MSDL_ConvertSurface, MSDL_FreeSurface, Dye::normalDye(), and reportAlways.
|
virtual |
Loads an image from an SDL surface.
Reimplemented from ImageHelper.
Definition at line 137 of file sdlimagehelper.cpp.
References _SDLload().
Referenced by load().
|
static |
< Surface is in system memory
Definition at line 210 of file sdlimagehelper.cpp.
References MSDL_ConvertSurface.
|
inlinestatic |
|
inlinestatic |
|
friend |
Definition at line 45 of file sdlimagehelper.h.
Referenced by _SDLload(), and createTextSurface().
|
staticprotected |
Definition at line 100 of file sdlimagehelper.h.
Referenced by SDLGetEnableAlphaCache(), and SDLSetEnableAlphaCache().