def bounds (self):
    """bounds() -> Rect

    Returns the bounding Rectangle for this Polygon.
    """
    if self._dirty:
      min = self.vertices[0].copy()
      max = self.vertices[0].copy()
      for point in self.vertices[1:]:
        if point.x < min.x: min.x = point.x
        if point.y < min.y: min.y = point.y
        if point.x > max.x: max.x = point.x
        if point.y > max.y: max.y = point.y

      self._bounds = Rect(min, max)
    self._dirty  = False

    return self._bounds
bounds() -> Rect

    Returns the bounding Rectangle for this Polygon.