Add more CFFI methods, improve use within the tools (force color order)
This commit is contained in:
19
project/include/graphics/PixelFormat.h
Normal file
19
project/include/graphics/PixelFormat.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef LIME_GRAPHICS_PIXEL_FORMAT_H
|
||||
#define LIME_GRAPHICS_PIXEL_FORMAT_H
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
enum PixelFormat {
|
||||
|
||||
RGBA,
|
||||
ARGB
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -4,10 +4,12 @@
|
||||
|
||||
#include <hx/CFFI.h>
|
||||
#include <graphics/Image.h>
|
||||
#include <graphics/PixelFormat.h>
|
||||
#include <math/ColorMatrix.h>
|
||||
#include <math/Rectangle.h>
|
||||
#include <math/Vector2.h>
|
||||
#include <system/System.h>
|
||||
#include <utils/ByteArray.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
@@ -18,13 +20,16 @@ namespace lime {
|
||||
|
||||
public:
|
||||
|
||||
static void ColorTransform (Image *image, Rectangle *rect, ColorMatrix *ColorMatrix);
|
||||
static void ColorTransform (Image* image, Rectangle* rect, ColorMatrix* ColorMatrix);
|
||||
static void CopyChannel (Image* image, Image* sourceImage, Rectangle* sourceRect, Vector2* destPoint, int srcChannel, int destChannel);
|
||||
static void CopyPixels (Image* image, Image* sourceImage, Rectangle* sourceRect, Vector2* destPoint, bool mergeAlpha);
|
||||
static void FillRect (Image* image, Rectangle* rect, int color);
|
||||
static void FloodFill (Image* image, int x, int y, int color);
|
||||
static void MultiplyAlpha (Image *image);
|
||||
static void UnmultiplyAlpha (Image *image);
|
||||
static void GetPixels (Image* image, Rectangle* rect, PixelFormat format, ByteArray* pixels);
|
||||
static void Merge (Image* image, Image* sourceImage, Rectangle* sourceRect, Vector2* destPoint, int redMultiplier, int greenMultiplier, int blueMultiplier, int alphaMultiplier);
|
||||
static void MultiplyAlpha (Image* image);
|
||||
static void Resize (Image* image, ImageBuffer* buffer, int width, int height);
|
||||
static void UnmultiplyAlpha (Image* image);
|
||||
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user