polygon

draw.polygon(smooth=False, draw_on_drag=True, **kwargs)

Draw arbitrary polygons

  • RIGHT click to add points (or drag while holding RIGHT mouse button)

  • MIDDLE click to finalize the polygon

  • LEFT click to successively remove most recently added points

Parameters:
  • draw_on_drag (bool, optional) – Continue adding points to the polygon on drag-events (e.g. mouse-button down + move). The default is True.

  • kwargs – additional kwargs passed to the shape.