8607cdd783
* Removes VectorShape from user python interactions * Re-integrates vectorio with displayio behind draw protocol implementations * Implements draw protocol with VectorShape * Composes VectorShape behaviors into Rectangle, Circle and Polygon * Fixes terrible pixel garbage being left behind * Improves redraw performance (heuristically) by tracking dirty area separately from current area. Known Issues: It does not work with transposed views.
19 lines
467 B
C
19 lines
467 B
C
#ifndef MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_POLYGON_H
|
|
#define MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_POLYGON_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "py/obj.h"
|
|
#include "shared-module/vectorio/__init__.h"
|
|
|
|
typedef struct {
|
|
mp_obj_base_t base;
|
|
// An int array[ x, y, ... ]
|
|
int *points_list;
|
|
size_t len;
|
|
vectorio_event_t on_dirty;
|
|
mp_obj_t draw_protocol_instance;
|
|
} vectorio_polygon_t;
|
|
|
|
#endif // MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_POLYGON_H
|