@@ -85,12 +85,9 @@ static mp_obj_t vectorio_rectangle_obj_set_width(mp_obj_t self_in, mp_obj_t widt
8585}
8686MP_DEFINE_CONST_FUN_OBJ_2 (vectorio_rectangle_set_width_obj , vectorio_rectangle_obj_set_width );
8787
88- const mp_obj_property_t vectorio_rectangle_width_obj = {
89- .base .type = & mp_type_property ,
90- .proxy = {(mp_obj_t )& vectorio_rectangle_get_width_obj ,
91- (mp_obj_t )& vectorio_rectangle_set_width_obj ,
92- MP_ROM_NONE },
93- };
88+ MP_PROPERTY_GETSET (vectorio_rectangle_width_obj ,
89+ (mp_obj_t )& vectorio_rectangle_get_width_obj ,
90+ (mp_obj_t )& vectorio_rectangle_set_width_obj );
9491
9592//| height: int
9693//| """The height of the rectangle in pixels."""
@@ -107,12 +104,9 @@ static mp_obj_t vectorio_rectangle_obj_set_height(mp_obj_t self_in, mp_obj_t hei
107104}
108105MP_DEFINE_CONST_FUN_OBJ_2 (vectorio_rectangle_set_height_obj , vectorio_rectangle_obj_set_height );
109106
110- const mp_obj_property_t vectorio_rectangle_height_obj = {
111- .base .type = & mp_type_property ,
112- .proxy = {(mp_obj_t )& vectorio_rectangle_get_height_obj ,
113- (mp_obj_t )& vectorio_rectangle_set_height_obj ,
114- MP_ROM_NONE },
115- };
107+ MP_PROPERTY_GETSET (vectorio_rectangle_height_obj ,
108+ (mp_obj_t )& vectorio_rectangle_get_height_obj ,
109+ (mp_obj_t )& vectorio_rectangle_set_height_obj );
116110
117111//| color_index: int
118112//| """The color_index of the rectangle in 1 based index of the palette."""
@@ -129,12 +123,9 @@ static mp_obj_t vectorio_rectangle_obj_set_color_index(mp_obj_t self_in, mp_obj_
129123}
130124MP_DEFINE_CONST_FUN_OBJ_2 (vectorio_rectangle_set_color_index_obj , vectorio_rectangle_obj_set_color_index );
131125
132- const mp_obj_property_t vectorio_rectangle_color_index_obj = {
133- .base .type = & mp_type_property ,
134- .proxy = {(mp_obj_t )& vectorio_rectangle_get_color_index_obj ,
135- (mp_obj_t )& vectorio_rectangle_set_color_index_obj ,
136- MP_ROM_NONE },
137- };
126+ MP_PROPERTY_GETSET (vectorio_rectangle_color_index_obj ,
127+ (mp_obj_t )& vectorio_rectangle_get_color_index_obj ,
128+ (mp_obj_t )& vectorio_rectangle_set_color_index_obj );
138129
139130// Documentation for properties inherited from VectorShape.
140131
0 commit comments