Skip to content

Commit 8dae57a

Browse files
authored
Merge pull request #6176 from FoamyGuy/vectorio_color_number
Vectorio color index
2 parents 479f7cb + 366b9fa commit 8dae57a

File tree

13 files changed

+204
-19
lines changed

13 files changed

+204
-19
lines changed

shared-bindings/vectorio/Circle.c

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@
1818
//| :param Union[~displayio.ColorConverter,~displayio.Palette] pixel_shader: The pixel shader that produces colors from values
1919
//| :param int radius: The radius of the circle in pixels
2020
//| :param int x: Initial x position of the axis.
21-
//| :param int y: Initial y position of the axis."""
21+
//| :param int y: Initial y position of the axis.
22+
//| :param int color_index: Initial color_index to use when selecting color from the palette."""
2223
//|
2324
static mp_obj_t vectorio_circle_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
24-
enum { ARG_pixel_shader, ARG_radius, ARG_x, ARG_y };
25+
enum { ARG_pixel_shader, ARG_radius, ARG_x, ARG_y, ARG_color_index };
2526
static const mp_arg_t allowed_args[] = {
2627
{ MP_QSTR_pixel_shader, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED },
2728
{ MP_QSTR_radius, MP_ARG_REQUIRED | MP_ARG_INT },
2829
{ MP_QSTR_x, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} },
2930
{ MP_QSTR_y, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} },
31+
{ MP_QSTR_color_index, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} },
3032
};
3133
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
3234
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
@@ -38,7 +40,8 @@ static mp_obj_t vectorio_circle_make_new(const mp_obj_type_t *type, size_t n_arg
3840

3941
vectorio_circle_t *self = m_new_obj(vectorio_circle_t);
4042
self->base.type = &vectorio_circle_type;
41-
common_hal_vectorio_circle_construct(self, radius);
43+
uint16_t color_index = args[ARG_color_index].u_int;
44+
common_hal_vectorio_circle_construct(self, radius, color_index);
4245

4346
// VectorShape parts
4447
mp_obj_t pixel_shader = args[ARG_pixel_shader].u_obj;
@@ -80,6 +83,29 @@ const mp_obj_property_t vectorio_circle_radius_obj = {
8083
MP_ROM_NONE},
8184
};
8285

86+
//| color_index : int
87+
//| """The color_index of the circle as 0 based index of the palette."""
88+
//|
89+
STATIC mp_obj_t vectorio_circle_obj_get_color_index(mp_obj_t self_in) {
90+
vectorio_circle_t *self = MP_OBJ_TO_PTR(self_in);
91+
return mp_obj_new_int(common_hal_vectorio_circle_get_color_index(self));
92+
}
93+
MP_DEFINE_CONST_FUN_OBJ_1(vectorio_circle_get_color_index_obj, vectorio_circle_obj_get_color_index);
94+
95+
STATIC mp_obj_t vectorio_circle_obj_set_color_index(mp_obj_t self_in, mp_obj_t color_index) {
96+
vectorio_circle_t *self = MP_OBJ_TO_PTR(self_in);
97+
common_hal_vectorio_circle_set_color_index(self, mp_obj_get_int(color_index));
98+
return mp_const_none;
99+
}
100+
MP_DEFINE_CONST_FUN_OBJ_2(vectorio_circle_set_color_index_obj, vectorio_circle_obj_set_color_index);
101+
102+
const mp_obj_property_t vectorio_circle_color_index_obj = {
103+
.base.type = &mp_type_property,
104+
.proxy = {(mp_obj_t)&vectorio_circle_get_color_index_obj,
105+
(mp_obj_t)&vectorio_circle_set_color_index_obj,
106+
MP_ROM_NONE},
107+
};
108+
83109

84110
// Documentation for properties inherited from VectorShape.
85111

@@ -103,6 +129,7 @@ STATIC const mp_rom_map_elem_t vectorio_circle_locals_dict_table[] = {
103129
{ MP_ROM_QSTR(MP_QSTR_radius), MP_ROM_PTR(&vectorio_circle_radius_obj) },
104130
{ MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) },
105131
{ MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) },
132+
{ MP_ROM_QSTR(MP_QSTR_color_index), MP_ROM_PTR(&vectorio_circle_color_index_obj) },
106133
{ MP_ROM_QSTR(MP_QSTR_location), MP_ROM_PTR(&vectorio_vector_shape_location_obj) },
107134
{ MP_ROM_QSTR(MP_QSTR_pixel_shader), MP_ROM_PTR(&vectorio_vector_shape_pixel_shader_obj) },
108135
};

shared-bindings/vectorio/Circle.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
extern const mp_obj_type_t vectorio_circle_type;
99

10-
void common_hal_vectorio_circle_construct(vectorio_circle_t *self, uint16_t radius);
10+
void common_hal_vectorio_circle_construct(vectorio_circle_t *self, uint16_t radius, uint16_t color_index);
1111

1212
void common_hal_vectorio_circle_set_on_dirty(vectorio_circle_t *self, vectorio_event_t notification);
1313

@@ -19,6 +19,9 @@ void common_hal_vectorio_circle_get_area(void *circle, displayio_area_t *out_are
1919
int16_t common_hal_vectorio_circle_get_radius(void *circle);
2020
void common_hal_vectorio_circle_set_radius(void *circle, int16_t radius);
2121

22+
uint16_t common_hal_vectorio_circle_get_color_index(void *obj);
23+
void common_hal_vectorio_circle_set_color_index(void *obj, uint16_t color_index);
24+
2225
mp_obj_t common_hal_vectorio_circle_get_draw_protocol(void *circle);
2326

2427
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_CIRCLE_H

shared-bindings/vectorio/Polygon.c

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,17 @@
2525
//| shader that produces colors from values
2626
//| :param List[Tuple[int,int]] points: Vertices for the polygon
2727
//| :param int x: Initial screen x position of the 0,0 origin in the points list.
28-
//| :param int y: Initial screen y position of the 0,0 origin in the points list."""
28+
//| :param int y: Initial screen y position of the 0,0 origin in the points list.
29+
//| :param int color_index: Initial color_index to use when selecting color from the palette."""
2930
//|
3031
static mp_obj_t vectorio_polygon_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
31-
enum { ARG_pixel_shader, ARG_points_list, ARG_x, ARG_y };
32+
enum { ARG_pixel_shader, ARG_points_list, ARG_x, ARG_y, ARG_color_index };
3233
static const mp_arg_t allowed_args[] = {
3334
{ MP_QSTR_pixel_shader, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED },
3435
{ MP_QSTR_points, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} },
3536
{ MP_QSTR_x, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} },
3637
{ MP_QSTR_y, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} },
38+
{ MP_QSTR_color_index, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} },
3739
};
3840
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
3941
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
@@ -43,7 +45,8 @@ static mp_obj_t vectorio_polygon_make_new(const mp_obj_type_t *type, size_t n_ar
4345
vectorio_polygon_t *self = m_new_obj(vectorio_polygon_t);
4446
self->base.type = &vectorio_polygon_type;
4547

46-
common_hal_vectorio_polygon_construct(self, points_list);
48+
uint16_t color_index = args[ARG_color_index].u_int;
49+
common_hal_vectorio_polygon_construct(self, points_list, color_index);
4750

4851
// VectorShape parts
4952
mp_obj_t pixel_shader = args[ARG_pixel_shader].u_obj;
@@ -86,6 +89,29 @@ const mp_obj_property_t vectorio_polygon_points_obj = {
8689
MP_ROM_NONE},
8790
};
8891

92+
//| color_index : int
93+
//| """The color_index of the polygon as 0 based index of the palette."""
94+
//|
95+
STATIC mp_obj_t vectorio_polygon_obj_get_color_index(mp_obj_t self_in) {
96+
vectorio_polygon_t *self = MP_OBJ_TO_PTR(self_in);
97+
return mp_obj_new_int(common_hal_vectorio_polygon_get_color_index(self));
98+
}
99+
MP_DEFINE_CONST_FUN_OBJ_1(vectorio_polygon_get_color_index_obj, vectorio_polygon_obj_get_color_index);
100+
101+
STATIC mp_obj_t vectorio_polygon_obj_set_color_index(mp_obj_t self_in, mp_obj_t color_index) {
102+
vectorio_polygon_t *self = MP_OBJ_TO_PTR(self_in);
103+
common_hal_vectorio_polygon_set_color_index(self, mp_obj_get_int(color_index));
104+
return mp_const_none;
105+
}
106+
MP_DEFINE_CONST_FUN_OBJ_2(vectorio_polygon_set_color_index_obj, vectorio_polygon_obj_set_color_index);
107+
108+
const mp_obj_property_t vectorio_polygon_color_index_obj = {
109+
.base.type = &mp_type_property,
110+
.proxy = {(mp_obj_t)&vectorio_polygon_get_color_index_obj,
111+
(mp_obj_t)&vectorio_polygon_set_color_index_obj,
112+
MP_ROM_NONE},
113+
};
114+
89115

90116
// Documentation for properties inherited from VectorShape.
91117

@@ -109,6 +135,7 @@ STATIC const mp_rom_map_elem_t vectorio_polygon_locals_dict_table[] = {
109135
{ MP_ROM_QSTR(MP_QSTR_points), MP_ROM_PTR(&vectorio_polygon_points_obj) },
110136
{ MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) },
111137
{ MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) },
138+
{ MP_ROM_QSTR(MP_QSTR_color_index), MP_ROM_PTR(&vectorio_polygon_color_index_obj) },
112139
{ MP_ROM_QSTR(MP_QSTR_location), MP_ROM_PTR(&vectorio_vector_shape_location_obj) },
113140
{ MP_ROM_QSTR(MP_QSTR_pixel_shader), MP_ROM_PTR(&vectorio_vector_shape_pixel_shader_obj) },
114141
};

shared-bindings/vectorio/Polygon.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
extern const mp_obj_type_t vectorio_polygon_type;
99

10-
void common_hal_vectorio_polygon_construct(vectorio_polygon_t *self, mp_obj_t points_list);
10+
void common_hal_vectorio_polygon_construct(vectorio_polygon_t *self, mp_obj_t points_list, uint16_t color_index);
1111
void common_hal_vectorio_polygon_set_on_dirty(vectorio_polygon_t *self, vectorio_event_t notification);
1212

1313

@@ -20,6 +20,9 @@ void common_hal_vectorio_polygon_get_area(void *polygon, displayio_area_t *out_a
2020
mp_obj_t common_hal_vectorio_polygon_get_points(vectorio_polygon_t *self);
2121
void common_hal_vectorio_polygon_set_points(vectorio_polygon_t *self, mp_obj_t points_list);
2222

23+
uint16_t common_hal_vectorio_polygon_get_color_index(void *obj);
24+
void common_hal_vectorio_polygon_set_color_index(void *obj, uint16_t color_index);
25+
2326
mp_obj_t common_hal_vectorio_polygon_get_draw_protocol(void *polygon);
2427

2528

shared-bindings/vectorio/Rectangle.c

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,18 @@
1717
//| :param int width: The number of pixels wide
1818
//| :param int height: The number of pixels high
1919
//| :param int x: Initial x position of the top left corner.
20-
//| :param int y: Initial y position of the top left corner."""
20+
//| :param int y: Initial y position of the top left corner.
21+
//| :param int color_index: Initial color_index to use when selecting color from the palette."""
2122
//|
2223
static mp_obj_t vectorio_rectangle_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
23-
enum { ARG_pixel_shader, ARG_width, ARG_height, ARG_x, ARG_y };
24+
enum { ARG_pixel_shader, ARG_width, ARG_height, ARG_x, ARG_y, ARG_color_index };
2425
static const mp_arg_t allowed_args[] = {
2526
{ MP_QSTR_pixel_shader, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED },
2627
{ MP_QSTR_width, MP_ARG_REQUIRED | MP_ARG_INT },
2728
{ MP_QSTR_height, MP_ARG_REQUIRED | MP_ARG_INT },
2829
{ MP_QSTR_x, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} },
2930
{ MP_QSTR_y, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} },
31+
{ MP_QSTR_color_index, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} },
3032
};
3133
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
3234
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
@@ -42,7 +44,8 @@ static mp_obj_t vectorio_rectangle_make_new(const mp_obj_type_t *type, size_t n_
4244

4345
vectorio_rectangle_t *self = m_new_obj(vectorio_rectangle_t);
4446
self->base.type = &vectorio_rectangle_type;
45-
common_hal_vectorio_rectangle_construct(self, width, height);
47+
uint16_t color_index = args[ARG_color_index].u_int;
48+
common_hal_vectorio_rectangle_construct(self, width, height, color_index);
4649

4750
// VectorShape parts
4851
mp_obj_t pixel_shader = args[ARG_pixel_shader].u_obj;
@@ -106,6 +109,29 @@ const mp_obj_property_t vectorio_rectangle_height_obj = {
106109
MP_ROM_NONE},
107110
};
108111

112+
//| color_index : int
113+
//| """The color_index of the rectangle in 1 based index of the palette."""
114+
//|
115+
STATIC mp_obj_t vectorio_rectangle_obj_get_color_index(mp_obj_t self_in) {
116+
vectorio_rectangle_t *self = MP_OBJ_TO_PTR(self_in);
117+
return mp_obj_new_int(common_hal_vectorio_rectangle_get_color_index(self));
118+
}
119+
MP_DEFINE_CONST_FUN_OBJ_1(vectorio_rectangle_get_color_index_obj, vectorio_rectangle_obj_get_color_index);
120+
121+
STATIC mp_obj_t vectorio_rectangle_obj_set_color_index(mp_obj_t self_in, mp_obj_t color_index) {
122+
vectorio_rectangle_t *self = MP_OBJ_TO_PTR(self_in);
123+
common_hal_vectorio_rectangle_set_color_index(self, mp_obj_get_int(color_index));
124+
return mp_const_none;
125+
}
126+
MP_DEFINE_CONST_FUN_OBJ_2(vectorio_rectangle_set_color_index_obj, vectorio_rectangle_obj_set_color_index);
127+
128+
const mp_obj_property_t vectorio_rectangle_color_index_obj = {
129+
.base.type = &mp_type_property,
130+
.proxy = {(mp_obj_t)&vectorio_rectangle_get_color_index_obj,
131+
(mp_obj_t)&vectorio_rectangle_set_color_index_obj,
132+
MP_ROM_NONE},
133+
};
134+
109135
// Documentation for properties inherited from VectorShape.
110136

111137
//| x : int
@@ -127,6 +153,7 @@ STATIC const mp_rom_map_elem_t vectorio_rectangle_locals_dict_table[] = {
127153
// Properties
128154
{ MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) },
129155
{ MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) },
156+
{ MP_ROM_QSTR(MP_QSTR_color_index), MP_ROM_PTR(&vectorio_rectangle_color_index_obj) },
130157
{ MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&vectorio_rectangle_width_obj) },
131158
{ MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&vectorio_rectangle_height_obj) },
132159
{ MP_ROM_QSTR(MP_QSTR_location), MP_ROM_PTR(&vectorio_vector_shape_location_obj) },

shared-bindings/vectorio/Rectangle.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
extern const mp_obj_type_t vectorio_rectangle_type;
99

10-
void common_hal_vectorio_rectangle_construct(vectorio_rectangle_t *self, uint32_t width, uint32_t height);
10+
void common_hal_vectorio_rectangle_construct(vectorio_rectangle_t *self, uint32_t width, uint32_t height, uint16_t color_index);
1111
void common_hal_vectorio_rectangle_set_on_dirty(vectorio_rectangle_t *self, vectorio_event_t on_dirty);
1212

1313
uint32_t common_hal_vectorio_rectangle_get_pixel(void *rectangle, int16_t x, int16_t y);
@@ -19,6 +19,9 @@ mp_obj_t common_hal_vectorio_rectangle_get_draw_protocol(void *rectangle);
1919
int16_t common_hal_vectorio_rectangle_get_width(void *obj);
2020
void common_hal_vectorio_rectangle_set_width(void *obj, int16_t width);
2121

22+
uint16_t common_hal_vectorio_rectangle_get_color_index(void *obj);
23+
void common_hal_vectorio_rectangle_set_color_index(void *obj, uint16_t color_index);
24+
2225
int16_t common_hal_vectorio_rectangle_get_height(void *obj);
2326
void common_hal_vectorio_rectangle_set_height(void *obj, int16_t height);
2427

shared-module/vectorio/Circle.c

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
#include "stdlib.h"
88

99

10-
void common_hal_vectorio_circle_construct(vectorio_circle_t *self, uint16_t radius) {
10+
void common_hal_vectorio_circle_construct(vectorio_circle_t *self, uint16_t radius, uint16_t color_index) {
1111
self->radius = radius;
1212
self->on_dirty.obj = NULL;
13+
self->color_index = color_index + 1;
1314
}
1415

1516
void common_hal_vectorio_circle_set_on_dirty(vectorio_circle_t *self, vectorio_event_t on_dirty) {
@@ -26,7 +27,7 @@ uint32_t common_hal_vectorio_circle_get_pixel(void *obj, int16_t x, int16_t y) {
2627
x = abs(x);
2728
y = abs(y);
2829
if (x + y <= radius) {
29-
return 1;
30+
return self->color_index;
3031
}
3132
if (x > radius) {
3233
return 0;
@@ -35,7 +36,7 @@ uint32_t common_hal_vectorio_circle_get_pixel(void *obj, int16_t x, int16_t y) {
3536
return 0;
3637
}
3738
const bool pythagorasSmallerThanRadius = (int32_t)x * x + (int32_t)y * y <= (int32_t)radius * radius;
38-
return pythagorasSmallerThanRadius ? 1 : 0;
39+
return pythagorasSmallerThanRadius ? self->color_index : 0;
3940
}
4041

4142

@@ -60,6 +61,19 @@ void common_hal_vectorio_circle_set_radius(void *obj, int16_t radius) {
6061
}
6162
}
6263

64+
uint16_t common_hal_vectorio_circle_get_color_index(void *obj) {
65+
vectorio_circle_t *self = obj;
66+
return self->color_index - 1;
67+
}
68+
69+
void common_hal_vectorio_circle_set_color_index(void *obj, uint16_t color_index) {
70+
vectorio_circle_t *self = obj;
71+
self->color_index = abs(color_index + 1);
72+
if (self->on_dirty.obj != NULL) {
73+
self->on_dirty.event(self->on_dirty.obj);
74+
}
75+
}
76+
6377
mp_obj_t common_hal_vectorio_circle_get_draw_protocol(void *circle) {
6478
vectorio_circle_t *self = circle;
6579
return self->draw_protocol_instance;

shared-module/vectorio/Circle.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
typedef struct {
1111
mp_obj_base_t base;
1212
uint16_t radius;
13+
uint16_t color_index;
1314
vectorio_event_t on_dirty;
1415
mp_obj_t draw_protocol_instance;
1516
} vectorio_circle_t;

shared-module/vectorio/Polygon.c

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,12 @@ static void _clobber_points_list(vectorio_polygon_t *self, mp_obj_t points_tuple
6161

6262

6363

64-
void common_hal_vectorio_polygon_construct(vectorio_polygon_t *self, mp_obj_t points_list) {
64+
void common_hal_vectorio_polygon_construct(vectorio_polygon_t *self, mp_obj_t points_list, uint16_t color_index) {
6565
VECTORIO_POLYGON_DEBUG("%p polygon_construct: ", self);
6666
self->points_list = NULL;
6767
self->len = 0;
6868
self->on_dirty.obj = NULL;
69+
self->color_index = color_index + 1;
6970
_clobber_points_list(self, points_list);
7071
VECTORIO_POLYGON_DEBUG("\n");
7172
}
@@ -181,10 +182,23 @@ uint32_t common_hal_vectorio_polygon_get_pixel(void *obj, int16_t x, int16_t y)
181182
x1 = x2;
182183
y1 = y2;
183184
}
184-
return winding_number == 0 ? 0 : 1;
185+
return winding_number == 0 ? 0 : self->color_index;
185186
}
186187

187188
mp_obj_t common_hal_vectorio_polygon_get_draw_protocol(void *polygon) {
188189
vectorio_polygon_t *self = polygon;
189190
return self->draw_protocol_instance;
190191
}
192+
193+
uint16_t common_hal_vectorio_polygon_get_color_index(void *obj) {
194+
vectorio_polygon_t *self = obj;
195+
return self->color_index - 1;
196+
}
197+
198+
void common_hal_vectorio_polygon_set_color_index(void *obj, uint16_t color_index) {
199+
vectorio_polygon_t *self = obj;
200+
self->color_index = abs(color_index + 1);
201+
if (self->on_dirty.obj != NULL) {
202+
self->on_dirty.event(self->on_dirty.obj);
203+
}
204+
}

shared-module/vectorio/Polygon.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ typedef struct {
1111
// An int array[ x, y, ... ]
1212
int16_t *points_list;
1313
uint16_t len;
14+
uint16_t color_index;
1415
vectorio_event_t on_dirty;
1516
mp_obj_t draw_protocol_instance;
1617
} vectorio_polygon_t;

0 commit comments

Comments
 (0)