The PySide.QtGui.QPolygonF class provides a vector of points using floating point precision.
A PySide.QtGui.QPolygonF is a QVector < PySide.QtCore.QPointF >. The easiest way to add points to a PySide.QtGui.QPolygonF is to use its streaming operator, as illustrated below:
polygon = QPolygonF() polygon << QPointF(10.4, 20.5) << QPointF(20.2, 30.2)In addition to the functions provided by QVector , PySide.QtGui.QPolygonF provides the PySide.QtGui.QPolygonF.boundingRect() and PySide.QtGui.QPolygonF.translate() functions for geometry operations. Use the QMatrix.map() function for more general transformations of QPolygonFs.
PySide.QtGui.QPolygonF also provides the PySide.QtGui.QPolygonF.isClosed() function to determine whether a polygon’s start and end points are the same, and the PySide.QtGui.QPolygonF.toPolygon() function returning an integer precision copy of this polygon.
The PySide.QtGui.QPolygonF class is implicitly shared .
See also
Parameters: |
|
---|
Constructs a polygon with no points.
See also
QVector.isEmpty()
Constructs a float based polygon from the specified integer based polygon .
See also
Constructs a copy of the given polygon .
Constructs a closed polygon from the specified rectangle .
The polygon contains the four vertices of the rectangle in clockwise order starting and ending with the top-left vertex.
See also
Constructs a polygon of the given size . Creates an empty polygon if size == 0.
See also
QVector.isEmpty()
Return type: | PySide.QtCore.int |
---|
Parameters: | t – PySide.QtCore.QPointF |
---|
Parameters: | i – PySide.QtCore.int |
---|---|
Return type: | PySide.QtCore.QPointF |
Return type: | PySide.QtCore.QRectF |
---|
Returns the bounding rectangle of the polygon, or PySide.QtCore.QRectF (0,0,0,0) if the polygon is empty.
See also
QVector.isEmpty()
Return type: | PySide.QtCore.int |
---|
Return type: | PySide.QtCore.QPointF |
---|
Parameters: | t – PySide.QtCore.QPointF |
---|---|
Return type: | PySide.QtCore.bool |
Parameters: |
|
---|---|
Return type: | PySide.QtCore.bool |
Return type: | PySide.QtCore.int |
---|
Parameters: | t – PySide.QtCore.QPointF |
---|---|
Return type: | PySide.QtCore.int |
Return type: | PySide.QtCore.QPointF |
---|
Return type: | PySide.QtCore.bool |
---|
Parameters: | t – PySide.QtCore.QPointF |
---|---|
Return type: | PySide.QtCore.bool |
Parameters: |
|
---|---|
Return type: |
Parameters: |
|
---|---|
Return type: |
Return type: | PySide.QtCore.QPointF |
---|
Parameters: | list – |
---|---|
Return type: |
Return type: | PySide.QtCore.QPointF |
---|
Parameters: |
|
---|---|
Return type: | PySide.QtCore.int |
Parameters: |
|
---|
Parameters: |
|
---|---|
Return type: |
Parameters: |
|
---|
Parameters: | r – PySide.QtGui.QPolygonF |
---|---|
Return type: | PySide.QtGui.QPolygonF |
Returns a polygon which is the intersection of this polygon and r .
Set operations on polygons will treat the polygons as areas. Non-closed polygons will be treated as implicitly closed.
Return type: | PySide.QtCore.bool |
---|
Returns true if the polygon is closed; otherwise returns false.
A polygon is said to be closed if its start point and end point are equal.
See also
QVector.first() QVector.last()
Return type: | PySide.QtCore.bool |
---|
Parameters: | other – |
---|---|
Return type: | PySide.QtCore.bool |
Return type: | PySide.QtCore.QPointF |
---|
Parameters: |
|
---|---|
Return type: | PySide.QtCore.int |
Parameters: |
|
---|---|
Return type: |
Parameters: | v – |
---|---|
Return type: | PySide.QtCore.bool |
Parameters: | m – PySide.QtGui.QTransform |
---|---|
Return type: | PySide.QtGui.QPolygonF |
Parameters: | m – PySide.QtGui.QMatrix |
---|---|
Return type: | PySide.QtGui.QPolygonF |
Parameters: | l – |
---|---|
Return type: |
Parameters: | l – |
---|---|
Return type: |
Parameters: | l – |
---|---|
Return type: |
Parameters: | t – PySide.QtCore.QPointF |
---|---|
Return type: |
Parameters: | v – |
---|---|
Return type: | PySide.QtCore.bool |
Parameters: | i – PySide.QtCore.int |
---|---|
Return type: | PySide.QtCore.QPointF |
Parameters: | t – PySide.QtCore.QPointF |
---|
Parameters: | t – PySide.QtCore.QPointF |
---|
Parameters: | t – PySide.QtCore.QPointF |
---|
Parameters: |
|
---|
Parameters: |
|
---|
Parameters: | i – PySide.QtCore.int |
---|
Parameters: |
|
---|
Parameters: | size – PySide.QtCore.int |
---|
Parameters: | size – PySide.QtCore.int |
---|
Parameters: | sharable – PySide.QtCore.bool |
---|
Return type: | PySide.QtCore.int |
---|
Return type: | PySide.QtCore.int |
---|
Parameters: | t – PySide.QtCore.QPointF |
---|---|
Return type: | PySide.QtCore.bool |
Parameters: | r – PySide.QtGui.QPolygonF |
---|---|
Return type: | PySide.QtGui.QPolygonF |
Returns a polygon which is r subtracted from this polygon.
Set operations on polygons will treat the polygons as areas. Non-closed polygons will be treated as implicitly closed.
Return type: |
---|
Return type: | PySide.QtGui.QPolygon |
---|
Creates and returns a PySide.QtGui.QPolygon by converting each PySide.QtCore.QPointF to a PySide.QtCore.QPoint .
See also
QPointF.toPoint()
Parameters: | offset – PySide.QtCore.QPointF |
---|
Translate all points in the polygon by the given offset .
See also
Parameters: |
|
---|
This is an overloaded function.
Translates all points in the polygon by (dx , dy ).
See also
Parameters: |
|
---|---|
Return type: |
This is an overloaded function.
Returns a copy of the polygon that is translated by (dx , dy ).
See also
Parameters: | offset – PySide.QtCore.QPointF |
---|---|
Return type: | PySide.QtGui.QPolygonF |
Returns a copy of the polygon that is translated by the given offset .
See also
Parameters: | r – PySide.QtGui.QPolygonF |
---|---|
Return type: | PySide.QtGui.QPolygonF |
Returns a polygon which is the union of this polygon and r .
Set operations on polygons will treat the polygons as areas. Non-closed polygons will be treated as implicitly closed.
Parameters: | i – PySide.QtCore.int |
---|---|
Return type: | PySide.QtCore.QPointF |
Parameters: |
|
---|---|
Return type: |