How can I change the type of a shape?