Refactored the ImageData decoding/encoding backends a bit

This commit is contained in:
Alex Szpakowski
2014-03-02 03:17:47 -04:00
parent 55514720a6
commit a3afb1a9ca
10 changed files with 179 additions and 57 deletions
+10 -3
View File
@@ -22,9 +22,13 @@
#define LOVE_IMAGE_MAGPIE_IMAGE_DATA_H
// LOVE
#include "FormatHandler.h"
#include "filesystem/File.h"
#include "image/ImageData.h"
// C++
#include <list>
namespace love
{
namespace image
@@ -36,9 +40,9 @@ class ImageData : public love::image::ImageData
{
public:
ImageData(love::filesystem::FileData *data);
ImageData(int width, int height);
ImageData(int width, int height, void *data, bool own);
ImageData(std::list<FormatHandler *> formats, love::filesystem::FileData *data);
ImageData(std::list<FormatHandler *> formats, int width, int height);
ImageData(std::list<FormatHandler *> formats, int width, int height, void *data, bool own);
virtual ~ImageData();
// Implements image::ImageData.
@@ -52,6 +56,9 @@ private:
// Decode and load an encoded format.
void decode(love::filesystem::FileData *data);
// Image format handlers we can use for decoding and encoding.
std::list<FormatHandler *> formatHandlers;
}; // ImageData
} // magpie