1919#include "supervisor/shared/translate.h"
2020
2121
22- //| .. currentmodule:: vectorio
22+ //| class VectorShape:
23+ //| def __init__(self, shape: vectorio.Polygon, pixel_shader: displayio.Palette, x: int=0, y: int=0):
24+ //| """Binds a vector shape to a location and pixel color
2325//|
24- //| :class:`VectorShape` -- Binds a vector shape to a location and pixel color
25- //| ==========================================================================
26- //|
27- //| .. class:: VectorShape( shape, pixel_shader, x=0, y=0)
28- //|
29- //| :param vectorio.Polygon shape: The shape to draw.
30- //| :param displayio.Palette pixel_shader: The pixel shader that produces colors from values
31- //| :param int x: Initial x position of the center axis of the shape within the parent.
32- //| :param int y: Initial y position of the center axis of the shape within the parent.
26+ //| :param shape: The shape to draw.
27+ //| :param pixel_shader: The pixel shader that produces colors from values
28+ //| :param x: Initial x position of the center axis of the shape within the parent.
29+ //| :param y: Initial y position of the center axis of the shape within the parent."""
30+ //| ...
3331//|
3432STATIC mp_obj_t vectorio_vector_shape_make_new (const mp_obj_type_t * type , size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
3533 enum { ARG_shape , ARG_pixel_shader , ARG_x , ARG_y };
@@ -95,9 +93,8 @@ STATIC mp_obj_t vectorio_vector_shape_make_new(const mp_obj_type_t *type, size_t
9593}
9694
9795
98- //| .. attribute:: x
99- //|
100- //| X position of the center point of the shape in the parent.
96+ //| x: int = ...
97+ //| """X position of the center point of the shape in the parent."""
10198//|
10299STATIC mp_obj_t vectorio_vector_shape_obj_get_x (mp_obj_t self_in ) {
103100 vectorio_vector_shape_t * self = MP_OBJ_TO_PTR (self_in );
@@ -122,9 +119,8 @@ const mp_obj_property_t vectorio_vector_shape_x_obj = {
122119};
123120
124121
125- //| .. attribute:: y
126- //|
127- //| Y position of the center point of the shape in the parent.
122+ //| y: int = ...
123+ //| """Y position of the center point of the shape in the parent."""
128124//|
129125STATIC mp_obj_t vectorio_vector_shape_obj_get_y (mp_obj_t self_in ) {
130126 vectorio_vector_shape_t * self = MP_OBJ_TO_PTR (self_in );
@@ -149,9 +145,8 @@ const mp_obj_property_t vectorio_vector_shape_y_obj = {
149145};
150146
151147
152- //| .. attribute:: pixel_shader
153- //|
154- //| The pixel shader of the shape.
148+ //| pixel_shader: displayio.Palette = ...
149+ //| """The pixel shader of the shape."""
155150//|
156151STATIC mp_obj_t vectorio_vector_shape_obj_get_pixel_shader (mp_obj_t self_in ) {
157152 vectorio_vector_shape_t * self = MP_OBJ_TO_PTR (self_in );
0 commit comments