This class represents an image in memory.
More...
#include <Image.hpp>
This class represents an image in memory.
LUMS_EXPORTED lm::Image::Image |
( |
| ) |
|
lm::Image::Image |
( |
const Image & |
| ) |
|
|
delete |
LUMS_EXPORTED lm::Image::Image |
( |
Image && |
rhs | ) |
|
Move-copy an Image.
- Parameters
-
rhs | The image to be moved from. |
LUMS_EXPORTED lm::Image::~Image |
( |
| ) |
|
unsigned int lm::Image::bufferHeight |
( |
| ) |
const |
|
inline |
Get the image buffer height.
- Returns
- The image buffer height.
unsigned int lm::Image::bufferWidth |
( |
| ) |
const |
|
inline |
Get the image buffer width.
- Returns
- The image buffer width.
const unsigned char* lm::Image::data |
( |
| ) |
const |
|
inline |
Get a direct pointer to the buffer
- Returns
- A pointer to the buffer
GLenum lm::Image::format |
( |
| ) |
const |
|
inline |
Get the image format, as an opengl enum. Can be GL_RGB or GL_RGBA
- Returns
- The image format
unsigned int lm::Image::height |
( |
| ) |
const |
|
inline |
Get the image height.
- Returns
- The image height.
LUMS_EXPORTED void lm::Image::load |
( |
| ) |
|
bool lm::Image::loaded |
( |
| ) |
const |
|
inline |
Check wether the image is loaded
- Returns
- True if the image is loaded, false otherwise
Deleted assignment operator
LUMS_EXPORTED Image& lm::Image::operator= |
( |
Image && |
rhs | ) |
|
Move-assign an Image.
- Parameters
-
rhs | The image to be moved from. |
LUMS_EXPORTED void lm::Image::setBuffer |
( |
unsigned char * |
buffer, |
|
|
unsigned int |
w, |
|
|
unsigned int |
h, |
|
|
GLenum |
format |
|
) |
| |
Set the image buffer
- Parameters
-
buffer | The new buffer |
w | The new buffer width |
h | The new buffer height |
format | The image format |
LUMS_EXPORTED void lm::Image::setPath |
( |
const std::string |
path, |
|
|
bool |
resource = true |
|
) |
| |
Set the load path.
- Parameters
-
path | The load path |
resource | If true, path is relative to the resource path |
LUMS_EXPORTED void lm::Image::setScale |
( |
float |
scale | ) |
|
Set the image scale when loaded. Images are interpolated using nearest pixel.
- Parameters
-
LUMS_EXPORTED void lm::Image::unload |
( |
| ) |
|
unsigned int lm::Image::width |
( |
| ) |
const |
|
inline |
Get the image width.
- Returns
- The image width.
The documentation for this class was generated from the following file: