QGraphicsPathItem Class Reference
[QtGui module]
该QGraphicsPathItem类提供了可以添加到一个路径项QGraphicsScene。More…
Methods
__init__ (self, QGraphicsItem parent = None, QGraphicsScene scene = None)
__init__ (self, QPainterPath path, QGraphicsItem parent = None, QGraphicsScene scene = None)
QRectF boundingRect (self)
bool contains (self, QPointF point)
bool isObscuredBy (self, QGraphicsItem item)
QPainterPath opaqueArea (self)
paint (self, QPainter painter, QStyleOptionGraphicsItem option, QWidget widget = None)
QPainterPath path (self)
setPath (self, QPainterPath path)
QPainterPath shape (self)
int type (self)
Detailed Description
该QGraphicsPathItem类提供了可以添加到一个路径项QGraphicsScene。
要设置项目的路径,通过一个QPainterPath到QGraphicsPathItem的构造函数,或致电setPath()函数。该path( )函数返回当前路径。
QGraphicsPathItem使用的路径,以提供合理的实施boundingRect( )shape()和contains( ) 。该paint使用该项目的相关画笔和画刷( )函数绘制的路径,你可以通过调用设置setPen()和setBrush()函数。
Method Documentation
QGraphicsPathItem.__init__ (self, QGraphicsItem parent = None, QGraphicsScene scene = None)
该parent的说法,如果不是没有,原因self通过Qt的,而不是PyQt的拥有。
该scene的说法,如果不是没有,原因self通过Qt的,而不是PyQt的拥有。
构造一个QGraphicsPath 。parent被传递给QAbstractGraphicsShapeItem的构造。
See also QGraphicsScene.addItem( ) 。
QGraphicsPathItem.__init__ (self, QPainterPath path, QGraphicsItem parent = None, QGraphicsScene scene = None)
该parent的说法,如果不是没有,原因self通过Qt的,而不是PyQt的拥有。
该scene的说法,如果不是没有,原因self通过Qt的,而不是PyQt的拥有。
构造使用QGraphicsPath项目path作为默认的路径。parent被传递给QAbstractGraphicsShapeItem的构造。
See also QGraphicsScene.addItem( ) 。
QRectF QGraphicsPathItem.boundingRect (self)
从重新实现QGraphicsItem.boundingRect( ) 。
bool QGraphicsPathItem.contains (self, QPointF point)
从重新实现QGraphicsItem.contains( ) 。
bool QGraphicsPathItem.isObscuredBy (self, QGraphicsItem item)
从重新实现QGraphicsItem.isObscuredBy( ) 。
QPainterPath QGraphicsPathItem.opaqueArea (self)
从重新实现QGraphicsItem.opaqueArea( ) 。
QGraphicsPathItem.paint (self, QPainter painter, QStyleOptionGraphicsItem option, QWidget widget = None)
从重新实现QGraphicsItem.paint( ) 。
QPainterPath QGraphicsPathItem.path (self)
[
QGraphicsPathItem.setPath (self, QPainterPath path)
设置项的路径,以在给定path。
]($docs-qpainterpath.html)
QPainterPath QGraphicsPathItem.shape (self)
int QGraphicsPathItem.type (self)
从重新实现QGraphicsItem.type( ) 。