circuitpython/shared-module/vectorio/Rectangle.h
Kenny 8607cdd783 vectorio: add draw protocol
* 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.
2021-08-02 20:19:54 -07:00

16 lines
369 B
C

#ifndef MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_RECTANGLE_H
#define MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_RECTANGLE_H
#include <stdint.h>
#include "py/obj.h"
typedef struct {
mp_obj_base_t base;
uint16_t width;
uint16_t height;
mp_obj_t draw_protocol_instance;
} vectorio_rectangle_t;
#endif // MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_RECTANGLE_H