Data structure modeling shapes. type_ is one of the strings “polygon”, “image” or “compound”. What data must be depends on type_: for “polygon” a tuple of pairs of coordinates, for “image” an image (only used internally), and for “compound” None, as a compound shape is built up using the addcomponent() method.