FifeGUI
0.2.0
A C++ GUI library designed for games.
fifechan
imageloader.hpp
1
// SPDX-License-Identifier: LGPL-2.1-or-later OR BSD-3-Clause
2
// SPDX-FileCopyrightText: 2004 - 2008 Olof Naessén and Per Larsson
3
// SPDX-FileCopyrightText: 2013 - 2026 Fifengine contributors
4
5
#ifndef INCLUDE_FIFECHAN_IMAGELOADER_HPP_
6
#define INCLUDE_FIFECHAN_IMAGELOADER_HPP_
7
8
#include <string>
9
10
#include "fifechan/platform.hpp"
11
12
namespace
fcn
13
{
14
class
Image
;
15
33
class
FIFEGUI_API ImageLoader
34
{
35
public
:
36
virtual
~ImageLoader() =
default
;
37
38
ImageLoader(ImageLoader
const
&) =
default
;
39
ImageLoader& operator=(ImageLoader
const
&) =
default
;
40
ImageLoader(ImageLoader&&) =
default
;
41
ImageLoader& operator=(ImageLoader&&) =
default
;
42
43
protected
:
44
ImageLoader() =
default
;
45
46
public
:
59
Image
*
load
(std::string
const
& filename)
60
{
61
return
load
(filename,
true
);
62
}
63
71
virtual
Image
*
load
(std::string
const
& filename,
bool
convertToDisplayFormat) = 0;
72
};
73
}
// namespace fcn
74
75
#endif
// INCLUDE_FIFECHAN_IMAGELOADER_HPP_
fcn::ImageLoader::load
virtual Image * load(std::string const &filename, bool convertToDisplayFormat)=0
Loads an image, optionally converting it to display format.
fcn::ImageLoader::load
Image * load(std::string const &filename)
Loads an image.
Definition
imageloader.hpp:59
fcn::Image
Abstract holder for image data.
Definition
image.hpp:32
Generated by
1.16.1