The PySide.QtGui.QGraphicsEllipseItem class provides an ellipse item that you can add to a PySide.QtGui.QGraphicsScene .
PySide.QtGui.QGraphicsEllipseItem respresents an ellipse with a fill and an outline, and you can also use it for ellipse segments (see PySide.QtGui.QGraphicsEllipseItem.startAngle() , PySide.QtGui.QGraphicsEllipseItem.spanAngle() ).
To set the item’s ellipse, pass a PySide.QtCore.QRectF to PySide.QtGui.QGraphicsEllipseItem ‘s constructor, or call PySide.QtGui.QGraphicsEllipseItem.setRect() . The PySide.QtGui.QGraphicsEllipseItem.rect() function returns the current ellipse geometry.
PySide.QtGui.QGraphicsEllipseItem uses the rect and the pen width to provide a reasonable implementation of PySide.QtGui.QGraphicsEllipseItem.boundingRect() , PySide.QtGui.QGraphicsEllipseItem.shape() , and PySide.QtGui.QGraphicsEllipseItem.contains() . The PySide.QtGui.QGraphicsEllipseItem.paint() function draws the ellipse using the item’s associated pen and brush, which you can set by calling PySide.QtGui.QAbstractGraphicsShapeItem.setPen() and PySide.QtGui.QAbstractGraphicsShapeItem.setBrush() .
Parameters: |
|
---|
Return type: | PySide.QtCore.QRectF |
---|
Returns the item’s ellipse geometry as a PySide.QtCore.QRectF .
Parameters: | rect – PySide.QtCore.QRectF |
---|
Sets the item’s ellipse geometry to rect . The rectangle’s left edge defines the left edge of the ellipse, and the rectangle’s top edge describes the top of the ellipse. The height and width of the rectangle describe the height and width of the ellipse.
Parameters: |
|
---|
Sets the item’s rectangle to the rectangle defined by (x , y ) and the given width and height .
This convenience function is equivalent to calling setRect(QRectF(x, y, width, height))
Parameters: | angle – PySide.QtCore.int |
---|
Sets the span angle for an ellipse segment to angle , which is in 16ths of a degree. This angle is used together with PySide.QtGui.QGraphicsEllipseItem.startAngle() to represent an ellipse segment (a pie). By default, the span angle is 5760 (360 * 16, a full ellipse).
Parameters: | angle – PySide.QtCore.int |
---|
Sets the start angle for an ellipse segment to angle , which is in 16ths of a degree. This angle is used together with PySide.QtGui.QGraphicsEllipseItem.spanAngle() for representing an ellipse segment (a pie). By default, the start angle is 0.
Return type: | PySide.QtCore.int |
---|
Returns the span angle of an ellipse segment in 16ths of a degree. This angle is used together with PySide.QtGui.QGraphicsEllipseItem.startAngle() for representing an ellipse segment (a pie). By default, this function returns 5760 (360 * 16, a full ellipse).
Return type: | PySide.QtCore.int |
---|
Returns the start angle for an ellipse segment in 16ths of a degree. This angle is used together with PySide.QtGui.QGraphicsEllipseItem.spanAngle() for representing an ellipse segment (a pie). By default, the start angle is 0.