aboutsummaryrefslogtreecommitdiff
path: root/circuitpython/shared-bindings/vectorio/Polygon.h
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2022-06-19 19:47:51 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2022-06-19 19:47:51 +0530
commit4fd287655a72b9aea14cdac715ad5b90ed082ed2 (patch)
tree65d393bc0e699dd12d05b29ba568e04cea666207 /circuitpython/shared-bindings/vectorio/Polygon.h
parent0150f70ce9c39e9e6dd878766c0620c85e47bed0 (diff)
add circuitpython code
Diffstat (limited to 'circuitpython/shared-bindings/vectorio/Polygon.h')
-rw-r--r--circuitpython/shared-bindings/vectorio/Polygon.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/circuitpython/shared-bindings/vectorio/Polygon.h b/circuitpython/shared-bindings/vectorio/Polygon.h
new file mode 100644
index 0000000..9d3ce2d
--- /dev/null
+++ b/circuitpython/shared-bindings/vectorio/Polygon.h
@@ -0,0 +1,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