mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-25 23:29:55 -06:00
start working on API to draw bitmaps
lay out emu thread
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user