blob: c020bfaab55ff1970bea026ee7be8a578be474e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#ifndef CUSTOM_ELEMENTS_H_
#define CUSTOM_ELEMENTS_H_
#include "clay.h"
typedef enum {
CUSTOM_ELEMENT_TYPE_CIRCLE,
CUSTOM_ELEMENT_TYPE_WAVE_SCREEN,
} CustomElementType;
typedef struct {
float start_angle;
float value;
} CircleData;
typedef struct {
float *point_buffer;
size_t buffer_len;
size_t thickness;
} WaveScreenData;
typedef struct {
CustomElementType type;
union {
CircleData circle;
WaveScreenData wave_screen;
};
} CustomElementData;
void handle_custom(Clay_BoundingBox bbox, Clay_CustomRenderData *config);
#endif // CUSTOM_ELEMENTS_H_
|