demo.h 590 B

1234567891011121314151617181920212223242526272829
  1. #ifndef DEMO_H
  2. #define DEMO_H
  3. #include "nanovg.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. struct DemoData {
  8. int fontNormal, fontBold, fontIcons, fontEmoji;
  9. int images[12];
  10. };
  11. typedef struct DemoData DemoData;
  12. int loadDemoData(NVGcontext* vg, DemoData* data);
  13. void freeDemoData(NVGcontext* vg, DemoData* data);
  14. void renderDemo(NVGcontext* vg, float mx, float my, float width, float height, float t, int blowup, DemoData* data);
  15. #ifndef NANOVG_VULKAN_IMPLEMENTATION
  16. void saveScreenShot(int w, int h, int premult, const char* name);
  17. #endif
  18. #ifdef __cplusplus
  19. }
  20. #endif
  21. #endif // DEMO_H