'Set if the polygon is closed
Parameters
closed : bool
True if the polygon is closed'

def set_closed(self, closed):

    if (self._closed == bool(closed)):
        return
    self._closed = bool(closed)
    self.set_xy(self.get_xy())
    self.stale = True
