diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2020-05-12 18:23:59 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2020-05-12 18:23:59 -0700 |
| commit | cde665172136b9be7720e22dbdc48c2bd224c483 (patch) | |
| tree | 918cb75a7ea1dd6f144de0c16fe577ea31155b97 /shared-bindings/vectorio/__init__.c | |
| parent | c816cfed58a6f875f91a3bb8629dd81acf076882 (diff) | |
| parent | 75f9969860870a4ae636c74ae210275413b13c2f (diff) | |
Merge remote-tracking branch 'adafruit/master' into improve_verification
Diffstat (limited to 'shared-bindings/vectorio/__init__.c')
| -rw-r--r-- | shared-bindings/vectorio/__init__.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/shared-bindings/vectorio/__init__.c b/shared-bindings/vectorio/__init__.c new file mode 100644 index 000000000..b9e3828bd --- /dev/null +++ b/shared-bindings/vectorio/__init__.c @@ -0,0 +1,46 @@ +#include <stdint.h> + +#include "py/obj.h" +#include "py/runtime.h" + +#include "shared-bindings/vectorio/Circle.h" +#include "shared-bindings/vectorio/Polygon.h" +#include "shared-bindings/vectorio/Rectangle.h" +#include "shared-bindings/vectorio/VectorShape.h" + +//| :mod:`vectorio` --- Lightweight 2d shapes for displays +//| ========================================================================= +//| +//| .. module:: vectorio +//| :synopsis: Adds vector graphics to displayio +//| :platform: SAMD21, SAMD51, nRF52 +//| +//| The `vectorio` module contains classes to construct shapes +//| by describing their points rather than providing them in bitmaps. +//| +//| Libraries +//| +//| .. toctree:: +//| :maxdepth: 3 +//| +//| Circle +//| Polygon +//| Rectangle +//| VectorShape +//| + + +STATIC const mp_rom_map_elem_t vectorio_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_vectorio) }, + { MP_ROM_QSTR(MP_QSTR_Circle), MP_ROM_PTR(&vectorio_circle_type) }, + { MP_ROM_QSTR(MP_QSTR_Polygon), MP_ROM_PTR(&vectorio_polygon_type) }, + { MP_ROM_QSTR(MP_QSTR_Rectangle), MP_ROM_PTR(&vectorio_rectangle_type) }, + { MP_ROM_QSTR(MP_QSTR_VectorShape), MP_ROM_PTR(&vectorio_vector_shape_type) }, +}; + +STATIC MP_DEFINE_CONST_DICT(vectorio_module_globals, vectorio_module_globals_table); + +const mp_obj_module_t vectorio_module = { + .base = { &mp_type_module }, + .globals = (mp_obj_dict_t*)&vectorio_module_globals, +}; |
