PySide.QtGui.QGraphicsPolygonItem class provides a polygon item that you can add to a PySide.QtGui.QGraphicsScene .
To set the item's polygon, pass a PySide.QtGui.QPolygonF to PySide.QtGui.QGraphicsPolygonItem ‘s constructor, or call the PySide.QtGui.QGraphicsPolygonItem.setPolygon() function. The PySide.QtGui.QGraphicsPolygonItem.polygon() function returns the current polygon.
PySide.QtGui.QGraphicsPolygonItem uses the polygon and the pen width to provide a reasonable implementation of PySide.QtGui.QGraphicsPolygonItem.boundingRect() , PySide.QtGui.QGraphicsPolygonItem.shape() ,和 PySide.QtGui.QGraphicsPolygonItem.contains() 。 PySide.QtGui.QGraphicsPolygonItem.paint() function draws the polygon using the item's associated pen and brush, which you can set by calling the PySide.QtGui.QAbstractGraphicsShapeItem.setPen() and PySide.QtGui.QAbstractGraphicsShapeItem.setBrush() 函数。
| 参数: |
|
|---|
| 返回类型: | PySide.QtCore.Qt.FillRule |
|---|
Returns the fill rule of the polygon. The default fill rule is Qt.OddEvenFill .
| 返回类型: | PySide.QtGui.QPolygonF |
|---|
Returns the item's polygon, or an empty polygon if no polygon has been set.
| 参数: | rule – PySide.QtCore.Qt.FillRule |
|---|
| 参数: | polygon – PySide.QtGui.QPolygonF |
|---|
Sets the item's polygon to be the given polygon .