Initial strict HL bindings for passing Image, Rectangle, Bytes

This commit is contained in:
Joshua Granick
2018-05-23 19:43:55 -07:00
parent f01e980114
commit 2fe10275e3
12 changed files with 369 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
#define LIME_GRAPHICS_IMAGE_BUFFER_H
#include <hl.h>
#include <hx/CFFI.h>
#include <graphics/PixelFormat.h>
#include <utils/ArrayBufferView.h>
@@ -10,6 +11,26 @@
namespace lime {
struct HL_ImageBuffer {
hl_type* t;
int bitsPerPixel;
HL_ArrayBufferView* data;
PixelFormat format;
int height;
bool premultiplied;
bool transparent;
int width;
void* __srcBitmapData;
// void* __srcCanvas;
void* __srcContext;
// void* __srcCustom;
void* __srcImage;
void* __srcImageData;
};
class ImageBuffer {
@@ -17,6 +38,7 @@ namespace lime {
ImageBuffer ();
ImageBuffer (value imageBuffer);
ImageBuffer (HL_ImageBuffer* imageBuffer);
~ImageBuffer ();
void Blit (const unsigned char *data, int x, int y, int width, int height);