Started the work toward adding images.

This commit is contained in:
Pietro Gagliardi 2016-06-25 11:22:55 -04:00
parent 4914d0c64c
commit da24b7154b
2 changed files with 18 additions and 0 deletions

3
ui.h
View File

@ -316,6 +316,9 @@ struct uiAreaDrawParams {
double ClipHeight;
};
// TODO merge
#include "uidrawimage.h"
typedef struct uiDrawPath uiDrawPath;
typedef struct uiDrawBrush uiDrawBrush;
typedef struct uiDrawStrokeParams uiDrawStrokeParams;

15
uidrawimage.h Normal file
View File

@ -0,0 +1,15 @@
// 25 june 2016
typedef struct uiDrawSingleResImage uiDrawSingleResImage;
typedef struct uiDrawMultiResImage uiDrawMultiResImage;
_UI_EXTERN uiDrawSingleResImage *uiDrawNewSingleResImage(void *data, int width, int height, int stride);
_UI_EXTERN void uiDrawFreeImage(uiDrawSingleResImage *i);
_UI_EXTERN void uiDrawSingleResImageNativeSize(uiDrawSingleResImage *i, uiDrawContext *c, double *width, double *height);
_UI_EXTERN uiDrawMultiResImage *uiDrawNewMultiResImage(double width, double height);
_UI_EXTERN void uiDrawFreeMultiResImage(uiDrawMultiResImage *i);
_UI_EXTERN void uiDrawMultiResImageAppend(void *data, int pixelWidth, int pixelHeight, int pixelStride);
_UI_EXTERN void uiDrawSingleRes(uiDrawContext *c, double x, double y, double width, double height uiDrawSingleResImage *image, int interpolate);
_UI_EXTERN void uiDrawMultiRes(uiDrawContext *c, double x, double y, double width, double height, uiDrawMultiResImage *image, int interpolate);