vecrec.accept_shape_as_rectangle

vecrec.accept_shape_as_rectangle(function)[source]

Method decorator that converts an argument to a rectangle.

Unlike accept_anything_as_rectangle(), only arguments that implement the Shape interface are accepted. Vector arguments will trigger a RectCastError.