2014-02-18 21:40:52 +02:00
|
|
|
#ifndef DEMO_H
|
|
|
|
#define DEMO_H
|
2014-02-09 17:33:31 +02:00
|
|
|
|
|
|
|
#include "nanovg.h"
|
|
|
|
|
2014-02-11 20:38:24 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-02-09 17:33:31 +02:00
|
|
|
struct DemoData {
|
2016-08-21 02:31:57 +08:00
|
|
|
int fontNormal, fontBold, fontIcons, fontEmoji;
|
2014-02-09 17:33:31 +02:00
|
|
|
int images[12];
|
|
|
|
};
|
2014-07-11 19:21:19 +03:00
|
|
|
typedef struct DemoData DemoData;
|
2014-02-09 17:33:31 +02:00
|
|
|
|
2014-07-11 19:21:19 +03:00
|
|
|
int loadDemoData(NVGcontext* vg, DemoData* data);
|
|
|
|
void freeDemoData(NVGcontext* vg, DemoData* data);
|
|
|
|
void renderDemo(NVGcontext* vg, float mx, float my, float width, float height, float t, int blowup, DemoData* data);
|
2014-02-09 17:33:31 +02:00
|
|
|
|
2014-02-25 22:53:46 +02:00
|
|
|
void saveScreenShot(int w, int h, int premult, const char* name);
|
|
|
|
|
2014-02-11 20:38:24 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2016-08-17 00:33:48 +09:00
|
|
|
#endif // DEMO_H
|