Begin implementation of C++ Image data methods again
This commit is contained in:
@@ -28,8 +28,9 @@ namespace lime {
|
||||
Bytes *data;
|
||||
PixelFormat format;
|
||||
int height;
|
||||
int width;
|
||||
bool premultiplied;
|
||||
bool transparent;
|
||||
int width;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ namespace lime {
|
||||
|
||||
enum PixelFormat {
|
||||
|
||||
RGBA,
|
||||
ARGB,
|
||||
BGRA
|
||||
RGBA32,
|
||||
ARGB32,
|
||||
BGRA32
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -37,6 +37,32 @@ namespace lime {
|
||||
};
|
||||
|
||||
|
||||
class ImageDataView {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
ImageDataView (Image* image, Rectangle* rect);
|
||||
|
||||
void Clip (int x, int y, int width, int height);
|
||||
int Row (int y);
|
||||
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
|
||||
private:
|
||||
|
||||
Image* image;
|
||||
int offset;
|
||||
Rectangle* rect;
|
||||
int stride;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user