circuitpython/shared-bindings/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

18 lines
696 B
C

#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_RECTANGLE_H
#define MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_RECTANGLE_H
#include "shared-module/vectorio/Rectangle.h"
#include "shared-module/displayio/area.h"
extern const mp_obj_type_t vectorio_rectangle_type;
void common_hal_vectorio_rectangle_construct(vectorio_rectangle_t *self, uint32_t width, uint32_t height);
uint32_t common_hal_vectorio_rectangle_get_pixel(void *rectangle, int16_t x, int16_t y);
void common_hal_vectorio_rectangle_get_area(void *rectangle, displayio_area_t *out_area);
mp_obj_t common_hal_vectorio_rectangle_get_draw_protocol(void *rectangle);
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_RECTANGLE_H