206d0e598a
vectorio builds on m4 express feather Concrete shapes are composed into a VectorShape which is put into a displayio Group for display. VectorShape provides transpose and x/y positioning for shape implementations. Included Shapes: * Circle - A radius; Circle is positioned at its axis in the VectorShape. - You can freely modify the radius to grow and shrink the circle in-place. * Polygon - An ordered list of points. - Beteween each successive point an edge is inferred. A final edge closing the shape is inferred between the last point and the first point. - You can modify the points in a Polygon. The points' coordinate system is relative to (0, 0) so if you'd like a top-center justified 10x20 rectangle you can do points [(-5, 0), (5, 0), (5, 20), (0, 20)] and your VectorShape x and y properties will position the rectangle relative to its top center point * Rectangle A width and a height.
23 lines
856 B
C
23 lines
856 B
C
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_CIRCLE_H
|
|
#define MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_CIRCLE_H
|
|
|
|
#include "shared-module/vectorio/__init__.h"
|
|
#include "shared-module/vectorio/Circle.h"
|
|
#include "shared-module/displayio/area.h"
|
|
|
|
extern const mp_obj_type_t vectorio_circle_type;
|
|
|
|
void common_hal_vectorio_circle_construct(vectorio_circle_t *self, uint16_t radius);
|
|
|
|
void common_hal_vectorio_circle_set_on_dirty(vectorio_circle_t *self, vectorio_event_t notification);
|
|
|
|
uint32_t common_hal_vectorio_circle_get_pixel(void *circle, int16_t x, int16_t y);
|
|
|
|
void common_hal_vectorio_circle_get_area(void *circle, displayio_area_t *out_area);
|
|
|
|
|
|
int16_t common_hal_vectorio_circle_get_radius(void *circle);
|
|
void common_hal_vectorio_circle_set_radius(void *circle, int16_t radius);
|
|
|
|
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_CIRCLE_H
|