parameters: (self, pointlist, edgeColor=None, edgeWidth=None, fillColor=pid.transparent,
                    closed=0, dash=None, **kwargs)
docstring: drawPolygon(pointlist) -- draws a polygon
      pointlist: a list of (x,y) tuples defining vertices
docstring_summary: drawPolygon(pointlist) -- draws a polygon
      pointlist: a list of (x,y) tuples defining vertices
docstring_tokens: drawPolygon ( pointlist ) -- draws a polygon pointlist : a list of ( x y ) tuples defining vertices
function: def drawPolygon(self, pointlist, edgeColor=None, edgeWidth=None, fillColor=pid.transparent,
                    closed=0, dash=None, **kwargs):
      """drawPolygon(pointlist) -- draws a polygon
      pointlist: a list of (x,y) tuples defining vertices
  
      """
      pts = [QtCore.QPointF(x[0], x[1]) for x in pointlist]
      poly = QtGui.QPolygonF(pts)
  
      # set color for fill...
      filling = 0
      if fillColor:
        if fillColor != pid.transparent:
          filling = 1
          qColor = _ColorToQt(fillColor)
          self._brush.setColor(qColor)
  
      if filling:
        self._brush.setStyle(QtCore.Qt.SolidPattern)
      else:
        self._brush.setStyle(QtCore.Qt.NoBrush)
  
      # set color for edge...
      if not edgeColor:
        edgeColor = self.defaultLineColor
      qColor = _ColorToQt(edgeColor)
      if qColor:
        self._pen.setColor(qColor)
  
      # set edge width...
      if edgeWidth is None:
        edgeWidth = self.defaultLineWidth
      self._pen.setWidth(edgeWidth)
      self._pen.setJoinStyle(QtCore.Qt.RoundJoin)
  
      if dash is not None:
        self._pen.setStyle(QtCore.Qt.DashLine)
      else:
        self._pen.setStyle(QtCore.Qt.SolidLine)
      if not qColor:
        self._pen.setStyle(QtCore.Qt.NoPen)
      poly = self._scene.addPolygon(poly, self._pen, self._brush)
      self.nObjs += 1
      poly.setZValue(self.nObjs)
      self.objs.append(poly)
  
      if dash is not None:
        self._pen.setStyle(QtCore.Qt.SolidLine)
  
      self.nObjs += 1
function_tokens: def drawPolygon ( self , pointlist , edgeColor = None , edgeWidth = None , fillColor = pid . transparent , closed = 0 , dash = None , * * kwargs ) : pts = [ QtCore . QPointF ( x [ 0 ] , x [ 1 ] ) for x in pointlist ] poly = QtGui . QPolygonF ( pts ) # set color for fill... filling = 0 if fillColor : if fillColor != pid . transparent : filling = 1 qColor = _ColorToQt ( fillColor ) self . _brush . setColor ( qColor ) if filling : self . _brush . setStyle ( QtCore . Qt . SolidPattern ) else : self . _brush . setStyle ( QtCore . Qt . NoBrush ) # set color for edge... if not edgeColor : edgeColor = self . defaultLineColor qColor = _ColorToQt ( edgeColor ) if qColor : self . _pen . setColor ( qColor ) # set edge width... if edgeWidth is None : edgeWidth = self . defaultLineWidth self . _pen . setWidth ( edgeWidth ) self . _pen . setJoinStyle ( QtCore . Qt . RoundJoin ) if dash is not None : self . _pen . setStyle ( QtCore . Qt . DashLine ) else : self . _pen . setStyle ( QtCore . Qt . SolidLine ) if not qColor : self . _pen . setStyle ( QtCore . Qt . NoPen ) poly = self . _scene . addPolygon ( poly , self . _pen , self . _brush ) self . nObjs += 1 poly . setZValue ( self . nObjs ) self . objs . append ( poly ) if dash is not None : self . _pen . setStyle ( QtCore . Qt . SolidLine ) self . nObjs += 1