pbsplash/include/pbsplash.h
2023-06-07 18:55:07 +01:00

40 lines
674 B
C

#ifndef __pbsplash_h__
#define __pbsplash_h__
#define MM_TO_PX(dpi, mm) (dpi / 25.4) * (mm)
struct col {
union {
unsigned int rgba;
struct {
unsigned char r, g, b, a;
};
};
};
struct dpi_info {
long dpi;
int pixels_per_milli;
float logo_size_px;
int logo_size_max_mm;
};
typedef struct NSVGimage NSVGimage;
#define MAX_FRAMES 16
struct image_info {
char *path[MAX_FRAMES];
NSVGimage *image[MAX_FRAMES];
int num_frames;
float width;
float height;
float x;
float y;
};
void draw_svg(NSVGimage *image, int x, int y, int w, int h);
void animate_frame(int frame, int w, int y_off, long dpi, struct image_info *images);
#endif