change the interface for cylinder and add rect support