ManaPlus
|
#include <imagehelper.h>
Public Member Functions | |
virtual | ~ImageHelper () |
Image * | load (SDL_RWops *const rw) |
virtual Image * | load (SDL_RWops *const rw, Dye const &dye) |
virtual Image * | loadSurface (SDL_Surface *const) |
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 void | copySurfaceToImage (const Image *const image, const int x, const int y, SDL_Surface *const surface) const |
virtual RenderType | useOpenGL () const |
virtual void | postInit () |
Static Public Member Functions | |
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) |
Protected Member Functions | |
ImageHelper () | |
Static Protected Attributes | |
static bool | mEnableAlpha = true |
static RenderType | mUseOpenGL = RENDER_SOFTWARE |
Friends | |
class | CompoundSprite |
class | Image |
Defines a class for loading and storing images.
Definition at line 42 of file imagehelper.h.
|
inlinevirtual |
Definition at line 50 of file imagehelper.h.
|
inlineprotected |
Definition at line 114 of file imagehelper.h.
|
static |
< Surface is in system memory
Definition at line 134 of file imagehelper.cpp.
References MSDL_ConvertSurface.
Referenced by SDLImageHelper::_SDLload(), OpenGLImageHelper::load(), SafeOpenGLImageHelper::load(), main(), and TestLauncher::testTextures().
|
inlinevirtual |
Reimplemented in SafeOpenGLImageHelper, OpenGLImageHelper, and SDLImageHelper.
Definition at line 86 of file imagehelper.h.
Referenced by AtlasManager::createSDLAtlas().
|
virtual |
< Surface is in system memory
Reimplemented in SafeOpenGLImageHelper, and OpenGLImageHelper.
Definition at line 239 of file imagehelper.cpp.
References MSDL_CreateRGBSurface.
Referenced by TextChunk::generate(), TestLauncher::testBlitSpeed(), and TestLauncher::testTextures().
|
inlinevirtual |
Definition at line 76 of file imagehelper.h.
Referenced by TextChunk::generate().
|
static |
Definition at line 179 of file imagehelper.cpp.
References CAST_S32, CAST_U32, Logger::log(), and logger.
Referenced by Graphics::videoInfo().
Image * ImageHelper::load | ( | SDL_RWops *const | rw | ) |
Loads an image from an SDL_RWops structure.
rw | The SDL_RWops to load the image from. |
NULL
if an error occurred, a valid pointer otherwise. Definition at line 50 of file imagehelper.cpp.
References loadPng(), loadSurface(), Logger::log(), logger, and MSDL_FreeSurface.
Referenced by anonymous_namespace{imageloader.cpp}::DyedImageLoader::load(), and AtlasManager::loadImages().
< Surface is in system memory
Reimplemented in SDLImageHelper, SafeOpenGLImageHelper, and OpenGLImageHelper.
Definition at line 65 of file imagehelper.cpp.
References BLOCK_END, BLOCK_START, DYEPALETTEP, Dye::getAPalete(), Dye::getSPalete(), Dye::getType(), loadPng(), loadSurface(), Logger::log(), logger, MSDL_ConvertSurface, MSDL_FreeSurface, and Dye::normalDye().
|
static |
Definition at line 215 of file imagehelper.cpp.
References Logger::log(), logger, MIMG_LoadJPG_RW, and MIMG_LoadPNG_RW.
Referenced by load(), OpenGLImageHelper::load(), SafeOpenGLImageHelper::load(), and SDLImageHelper::load().
|
inlinevirtual |
Reimplemented in SDLImageHelper, SafeOpenGLImageHelper, and OpenGLImageHelper.
Definition at line 73 of file imagehelper.h.
Referenced by AtlasManager::convertAtlas(), AtlasManager::convertEmptyAtlas(), AtlasManager::createSDLAtlas(), load(), CompoundSprite::redraw(), Minimap::setMap(), and TestLauncher::testTextures().
|
inlinevirtual |
Reimplemented in SafeOpenGLImageHelper, and OpenGLImageHelper.
Definition at line 110 of file imagehelper.h.
Referenced by Client::initGraphics().
|
inlinestatic |
Definition at line 98 of file imagehelper.h.
References mEnableAlpha.
Referenced by GraphicsManager::initGraphics(), and Client::optionChanged().
|
inlinestatic |
Definition at line 103 of file imagehelper.h.
References mUseOpenGL, and useOpenGL().
Referenced by GraphicsManager::createRenderers().
|
inlinevirtual |
Definition at line 107 of file imagehelper.h.
References mUseOpenGL.
Referenced by AmbientLayer::AmbientLayer(), Desktop::draw(), AmbientLayer::draw(), Font::Font(), MapDebugTab::MapDebugTab(), CompoundSprite::setAlpha(), Desktop::setBestFittingWallpaper(), setOpenGlMode(), and CompoundSprite::updateImages().
|
friend |
Definition at line 44 of file imagehelper.h.
|
friend |
Definition at line 45 of file imagehelper.h.
|
staticprotected |
Definition at line 117 of file imagehelper.h.
Referenced by CompoundSprite::redraw(), and setEnableAlpha().
|
staticprotected |
Definition at line 118 of file imagehelper.h.
Referenced by OpenGLImageHelper::bindTexture(), SafeOpenGLImageHelper::bindTexture(), OpenGLImageHelper::glLoad(), setOpenGlMode(), and useOpenGL().