|
FifeGUI 0.3.0
A C++ GUI library designed for games.
|
#include <imageloader.hpp>
Public Member Functions | |
| SDL_PixelFormat const & | getSDLPixelFormat () |
| Image * | load (std::string const &filename) |
| fcn::Image * | load (std::string const &filename, bool convertToDisplayFormat) override |
| void | setRenderer (SDL_Renderer *renderer) |
| void | setSDLPixelFormat (SDL_PixelFormat const &format) |
| Public Member Functions inherited from fcn::ImageLoader | |
| ImageLoader (ImageLoader &&)=default | |
| ImageLoader (ImageLoader const &)=default | |
| Image * | load (std::string const &filename) |
| ImageLoader & | operator= (ImageLoader &&)=default |
| ImageLoader & | operator= (ImageLoader const &)=default |
| virtual | ~ImageLoader ()=default |
Protected Member Functions | |
| virtual SDL_Surface * | convertToStandardFormat (SDL_Surface *surface) |
| virtual SDL_Surface * | loadSDLSurface (std::string const &filename) |
| virtual SDL_Texture * | loadSDLTexture (std::string const &filename) |
SDL3-specific implementation of ImageLoader.
Definition at line 33 of file backends/sdl3/imageloader.hpp.
|
protectedvirtual |
Convert a surface to a standard internal format (internal).
Definition at line 101 of file imageloader.cpp.
Referenced by fcn::opengl::ImageLoader::load(), and load().
| SDL_PixelFormat const & fcn::sdl3::ImageLoader::getSDLPixelFormat | ( | ) |
Return the current SDL pixel format used for conversions.
Definition at line 158 of file imageloader.cpp.
|
inline |
Loads an image.
The single-argument overload forwards to the two-argument overload requesting conversion to display format.
| filename | The filename of the image to load. |
Definition at line 79 of file imageloader.hpp.
|
overridevirtual |
Load an image from filename.
Implements fcn::ImageLoader.
Definition at line 42 of file imageloader.cpp.
References convertToStandardFormat(), loadSDLSurface(), and fcn::throwException().
|
protectedvirtual |
Load an SDL_Surface from disk (internal).
Definition at line 71 of file imageloader.cpp.
Referenced by fcn::opengl::ImageLoader::load(), and load().
|
protectedvirtual |
Load an SDL_Texture from disk (internal).
Definition at line 86 of file imageloader.cpp.
| void fcn::sdl3::ImageLoader::setRenderer | ( | SDL_Renderer * | renderer | ) |
Set the SDL renderer used when creating textures.
Definition at line 66 of file imageloader.cpp.
| void fcn::sdl3::ImageLoader::setSDLPixelFormat | ( | SDL_PixelFormat const & | format | ) |
Set the SDL pixel format used for conversions.
Definition at line 163 of file imageloader.cpp.