aboutsummaryrefslogtreecommitdiff
path: root/circuitpython/shared-bindings/vectorio/Polygon.h
blob: 9d3ce2dcc7a1f6d30dce7fa8fc209610be68f058 (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
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_POLYGON_H
#define MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_POLYGON_H

#include "shared-module/vectorio/Polygon.h"
#include "shared-module/displayio/area.h"
#include "shared-module/vectorio/__init__.h"

extern const mp_obj_type_t vectorio_polygon_type;

void common_hal_vectorio_polygon_construct(vectorio_polygon_t *self, mp_obj_t points_list, uint16_t color_index);
void common_hal_vectorio_polygon_set_on_dirty(vectorio_polygon_t *self, vectorio_event_t notification);


uint32_t common_hal_vectorio_polygon_get_pixel(void *polygon, int16_t x, int16_t y);

void common_hal_vectorio_polygon_get_area(void *polygon, displayio_area_t *out_area);



mp_obj_t common_hal_vectorio_polygon_get_points(vectorio_polygon_t *self);
void common_hal_vectorio_polygon_set_points(vectorio_polygon_t *self, mp_obj_t points_list);

uint16_t common_hal_vectorio_polygon_get_color_index(void *obj);
void common_hal_vectorio_polygon_set_color_index(void *obj, uint16_t color_index);

mp_obj_t common_hal_vectorio_polygon_get_draw_protocol(void *polygon);


#endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_POLYGON_H