@@ -181,6 +181,33 @@ MP_PROPERTY_GETSET(vectorio_vector_shape_location_obj,
181181 (mp_obj_t )& vectorio_vector_shape_set_location_obj );
182182
183183
184+ // Stub checker does not approve of these shared properties.
185+ // hidden: bool
186+ // """Hide the shape or not."""
187+ //
188+ STATIC mp_obj_t vectorio_vector_shape_obj_get_hidden (mp_obj_t wrapper_shape ) {
189+ // Relies on the fact that only vector_shape impl gets matched with a VectorShape.
190+ const vectorio_draw_protocol_t * draw_protocol = mp_proto_get (MP_QSTR_protocol_draw , wrapper_shape );
191+ vectorio_vector_shape_t * self = MP_OBJ_TO_PTR (draw_protocol -> draw_get_protocol_self (wrapper_shape ));
192+ return mp_obj_new_bool (common_hal_vectorio_vector_shape_get_hidden (self ));
193+ }
194+ MP_DEFINE_CONST_FUN_OBJ_1 (vectorio_vector_shape_get_hidden_obj , vectorio_vector_shape_obj_get_hidden );
195+
196+ STATIC mp_obj_t vectorio_vector_shape_obj_set_hidden (mp_obj_t wrapper_shape , mp_obj_t hidden_obj ) {
197+ // Relies on the fact that only vector_shape impl gets matched with a VectorShape.
198+ const vectorio_draw_protocol_t * draw_protocol = mp_proto_get (MP_QSTR_protocol_draw , wrapper_shape );
199+ vectorio_vector_shape_t * self = MP_OBJ_TO_PTR (draw_protocol -> draw_get_protocol_self (wrapper_shape ));
200+
201+ common_hal_vectorio_vector_shape_set_hidden (self , mp_obj_is_true (hidden_obj ));
202+ return mp_const_none ;
203+ }
204+ MP_DEFINE_CONST_FUN_OBJ_2 (vectorio_vector_shape_set_hidden_obj , vectorio_vector_shape_obj_set_hidden );
205+
206+ MP_PROPERTY_GETSET (vectorio_vector_shape_hidden_obj ,
207+ (mp_obj_t )& vectorio_vector_shape_get_hidden_obj ,
208+ (mp_obj_t )& vectorio_vector_shape_set_hidden_obj );
209+
210+
184211// pixel_shader: Union[ColorConverter, Palette]
185212// """The pixel shader of the shape."""
186213//
0 commit comments