Minor refactor
This commit is contained in:
38
project/include/graphics/Image.h
Normal file
38
project/include/graphics/Image.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef LIME_GRAPHICS_IMAGE_H
|
||||
#define LIME_GRAPHICS_IMAGE_H
|
||||
|
||||
|
||||
#include <hx/CFFI.h>
|
||||
#include <utils/ByteArray.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
class Image {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
Image ();
|
||||
~Image ();
|
||||
|
||||
value Value ();
|
||||
|
||||
int width;
|
||||
int height;
|
||||
ByteArray *data;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
value mValue;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,33 +0,0 @@
|
||||
#ifndef LIME_GRAPHICS_IMAGE_DATA_H
|
||||
#define LIME_GRAPHICS_IMAGE_DATA_H
|
||||
|
||||
#include <hx/CFFI.h>
|
||||
#include <utils/ByteArray.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
class ImageData {
|
||||
|
||||
public:
|
||||
|
||||
int width;
|
||||
int height;
|
||||
ByteArray *data;
|
||||
|
||||
ImageData();
|
||||
~ImageData();
|
||||
value Value();
|
||||
|
||||
private:
|
||||
|
||||
value mValue;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -3,15 +3,16 @@
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
class ImageData;
|
||||
|
||||
|
||||
|
||||
class Image;
|
||||
|
||||
class JPEG {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
static bool Decode (const char *path, ImageData *imageData);
|
||||
static bool Decode (const char *path, Image *image);
|
||||
|
||||
|
||||
};
|
||||
|
||||
@@ -4,14 +4,15 @@
|
||||
|
||||
namespace lime {
|
||||
|
||||
class ImageData;
|
||||
|
||||
class Image;
|
||||
|
||||
class PNG {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
static bool Decode (const char *path, ImageData *imageData);
|
||||
static bool Decode (const char *path, Image *image);
|
||||
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user