The QGraphicsPolygonItem class provides a polygon item that you can add to a QGraphicsScene . 更多...
继承 QAbstractGraphicsShapeItem .
The QGraphicsPolygonItem class provides a polygon item that you can add to a QGraphicsScene .
To set the item's polygon, pass a QPolygonF to QGraphicsPolygonItem's constructor, or call the setPolygon () 函数。 polygon () function returns the current polygon.
QGraphicsPolygonItem uses the polygon and the pen width to provide a reasonable implementation of boundingRect (), shape (),和 contains ()。 paint () function draws the polygon using the item's associated pen and brush, which you can set by calling the setPen () 和 setBrush () 函数。
parent argument, if not None, causes self to be owned by Qt instead of PyQt.
scene argument, if not None, causes self to be owned by Qt instead of PyQt.
构造 QGraphicsPolygonItem . parent 会被传递给 QAbstractGraphicsShapeItem 's 构造函数。
另请参阅 QGraphicsScene.addItem ().
parent argument, if not None, causes self to be owned by Qt instead of PyQt.
scene argument, if not None, causes self to be owned by Qt instead of PyQt.
构造 QGraphicsPolygonItem with polygon as the default polygon. parent 会被传递给 QAbstractGraphicsShapeItem 's 构造函数。
另请参阅 QGraphicsScene.addItem ().
重实现自 QGraphicsItem.boundingRect ().
重实现自 QGraphicsItem.contains ().
Returns the fill rule of the polygon. The default fill rule is Qt.OddEvenFill .
另请参阅 setFillRule (), QPainterPath.fillRule (),和 QPainter.drawPolygon ().
重实现自 QGraphicsItem.isObscuredBy ().
重实现自 QGraphicsItem.opaqueArea ().
重实现自 QGraphicsItem.paint ().
Returns the item's polygon, or an empty polygon if no polygon has been set.
另请参阅 setPolygon ().
Sets the fill rule of the polygon to rule 。默认 fill rule is Qt.OddEvenFill .
另请参阅 fillRule (), QPainterPath.fillRule (),和 QPainter.drawPolygon ().
Sets the item's polygon to be the given polygon .
另请参阅 polygon ().
重实现自 QGraphicsItem.shape ().
重实现自 QGraphicsItem.type ().