aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl/libui/ui.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libui_sdl/libui/ui.h')
-rw-r--r--src/libui_sdl/libui/ui.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libui_sdl/libui/ui.h b/src/libui_sdl/libui/ui.h
index 27574a5..835b0c2 100644
--- a/src/libui_sdl/libui/ui.h
+++ b/src/libui_sdl/libui/ui.h
@@ -342,6 +342,8 @@ typedef struct uiDrawMatrix uiDrawMatrix;
typedef struct uiDrawBrushGradientStop uiDrawBrushGradientStop;
+typedef struct uiDrawBitmap uiDrawBitmap;
+
_UI_ENUM(uiDrawBrushType) {
uiDrawBrushTypeSolid,
uiDrawBrushTypeLinearGradient,
@@ -429,6 +431,15 @@ struct uiDrawStrokeParams {
double DashPhase;
};
+struct uiRect {
+ int X;
+ int Y;
+ int Width;
+ int Height;
+};
+
+typedef struct uiRect uiRect;
+
_UI_EXTERN uiDrawPath *uiDrawNewPath(uiDrawFillMode fillMode);
_UI_EXTERN void uiDrawFreePath(uiDrawPath *p);
@@ -475,6 +486,12 @@ _UI_EXTERN void uiDrawClip(uiDrawContext *c, uiDrawPath *path);
_UI_EXTERN void uiDrawSave(uiDrawContext *c);
_UI_EXTERN void uiDrawRestore(uiDrawContext *c);
+// bitmap API
+_UI_EXTERN uiDrawBitmap* uiDrawNewBitmap(uiDrawContext* c, int width, int height);
+_UI_EXTERN void uiDrawBitmapUpdate(uiDrawBitmap* bmp, const void* data);
+_UI_EXTERN void uiDrawBitmapDraw(uiDrawContext* c, uiDrawBitmap* bmp, uiRect* srcrect, uiRect* dstrect);
+_UI_EXTERN void uiDrawFreeBitmap(uiDrawBitmap* bmp);
+
// TODO manage the use of Text, Font, and TextFont, and of the uiDrawText prefix in general
///// TODO reconsider this