|
FifeGUI 0.2.0
A C++ GUI library designed for games.
|
#include <imageloader.hpp>
Public Member Functions | |
| ImageLoader (ImageLoader &&)=default | |
| ImageLoader (ImageLoader const &)=default | |
| Image * | load (std::string const &filename) |
| virtual Image * | load (std::string const &filename, bool convertToDisplayFormat)=0 |
| ImageLoader & | operator= (ImageLoader &&)=default |
| ImageLoader & | operator= (ImageLoader const &)=default |
Abstract interface for loading image assets.
FifeGUI contains implementations of ImageLoader for common libraries like the SDL library. To make FifeGUI usable with other libraries, an ImageLoader class must be implemented.
To make FifeGUIuse an image loader, the image loader needs to be passed to the Image class using the static method Image::setImageLoader.
Definition at line 33 of file imageloader.hpp.
|
inline |
Loads an image.
The single-argument overload forwards to the two-argument overload requesting conversion to display format.
NOTE: The functions Image::getPixel and Image::putPixel are only guaranteed to work before an image has been converted to display format.
| filename | The filename of the image to load. |
Definition at line 59 of file imageloader.hpp.
References load().
Referenced by load().
|
pure virtual |
Loads an image, optionally converting it to display format.
| filename | The filename of the image to load. |
| convertToDisplayFormat | True if the image should be converted to display format, false otherwise. |
Implemented in fcn::opengl::ImageLoader, and fcn::sdl2::ImageLoader.