Add support for PixelFormat (RGBA, ARGB) in Image, add more CFFI methods
This commit is contained in:
@@ -23,6 +23,7 @@ namespace lime {
|
||||
int height;
|
||||
int offsetX;
|
||||
int offsetY;
|
||||
bool transparent;
|
||||
int width;
|
||||
|
||||
private:
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include <graphics/Image.h>
|
||||
#include <math/ColorMatrix.h>
|
||||
#include <math/Rectangle.h>
|
||||
#include <math/Vector2.h>
|
||||
#include <system/System.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
@@ -17,6 +19,9 @@ namespace lime {
|
||||
public:
|
||||
|
||||
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 MultiplyAlpha (Image *image);
|
||||
static void UnmultiplyAlpha (Image *image);
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace lime {
|
||||
public:
|
||||
|
||||
Rectangle ();
|
||||
Rectangle (value _rect);
|
||||
Rectangle (value rect);
|
||||
|
||||
double height;
|
||||
double width;
|
||||
|
||||
29
project/include/math/Vector2.h
Normal file
29
project/include/math/Vector2.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef LIME_MATH_VECTOR2_H
|
||||
#define LIME_MATH_VECTOR2_H
|
||||
|
||||
|
||||
#include <hx/CFFI.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
class Vector2 {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
Vector2 ();
|
||||
Vector2 (value vec);
|
||||
|
||||
double x;
|
||||
double y;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user