PySide.QtGui.QPolygonF class provides a vector of points using floating point precision.
A PySide.QtGui.QPolygonF 是 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.
PySide.QtGui.QPolygonF class is 隐式共享 .
另请参阅
| 参数: |
|
|---|
Constructs a polygon with no points.
另请参阅
QVector.isEmpty()
Constructs a float based polygon from the specified integer based polygon .
构造副本为给定 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.
Constructs a polygon of the given size . Creates an empty polygon if size == 0.
另请参阅
QVector.isEmpty()
| 返回类型: | PySide.QtCore.int |
|---|
| 参数: | t – PySide.QtCore.QPointF |
|---|
| 参数: | i – PySide.QtCore.int |
|---|---|
| 返回类型: | PySide.QtCore.QPointF |
| 返回类型: | PySide.QtCore.QRectF |
|---|
Returns the bounding rectangle of the polygon, or PySide.QtCore.QRectF (0,0,0,0) if the polygon is empty.
另请参阅
QVector.isEmpty()
| 返回类型: | PySide.QtCore.int |
|---|
| 返回类型: | PySide.QtCore.QPointF |
|---|
| 参数: | t – PySide.QtCore.QPointF |
|---|---|
| 返回类型: | PySide.QtCore.bool |
| 参数: |
|
|---|---|
| 返回类型: |
PySide.QtCore.bool |
| 参数: | t – PySide.QtCore.QPointF |
|---|---|
| 返回类型: | PySide.QtCore.int |
| 返回类型: | PySide.QtCore.int |
|---|
| 返回类型: | PySide.QtCore.QPointF |
|---|
| 返回类型: | PySide.QtCore.bool |
|---|
| 参数: | t – PySide.QtCore.QPointF |
|---|---|
| 返回类型: | PySide.QtCore.bool |
| 参数: |
|
|---|---|
| 返回类型: |
| 参数: |
|
|---|---|
| 返回类型: |
| 返回类型: | PySide.QtCore.QPointF |
|---|
| 参数: | list – |
|---|---|
| 返回类型: |
| 返回类型: | PySide.QtCore.QPointF |
|---|
| 参数: |
|
|---|---|
| 返回类型: |
PySide.QtCore.int |
| 参数: |
|
|---|
| 参数: |
|
|---|
| 参数: |
|
|---|---|
| 返回类型: |
| 参数: | r – PySide.QtGui.QPolygonF |
|---|---|
| 返回类型: | 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.
| 返回类型: | 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.
另请参阅
QVector.first() QVector.last()
| 返回类型: | PySide.QtCore.bool |
|---|
| 参数: | other – |
|---|---|
| 返回类型: | PySide.QtCore.bool |
| 返回类型: | PySide.QtCore.QPointF |
|---|
| 参数: |
|
|---|---|
| 返回类型: |
PySide.QtCore.int |
| 参数: |
|
|---|---|
| 返回类型: |
| 参数: | v – |
|---|---|
| 返回类型: | PySide.QtCore.bool |
| 参数: | m – PySide.QtGui.QMatrix |
|---|---|
| 返回类型: | PySide.QtGui.QPolygonF |
| 参数: | m – PySide.QtGui.QTransform |
|---|---|
| 返回类型: | PySide.QtGui.QPolygonF |
| 参数: | l – |
|---|---|
| 返回类型: |
| 参数: | t – PySide.QtCore.QPointF |
|---|---|
| 返回类型: |
| 参数: | v – |
|---|---|
| 返回类型: | PySide.QtCore.bool |
| 参数: | i – PySide.QtCore.int |
|---|---|
| 返回类型: | PySide.QtCore.QPointF |
| 参数: | t – PySide.QtCore.QPointF |
|---|
| 参数: | t – PySide.QtCore.QPointF |
|---|
| 参数: | t – PySide.QtCore.QPointF |
|---|
| 参数: |
|
|---|
| 参数: |
|
|---|
| 参数: | i – PySide.QtCore.int |
|---|
| 参数: |
|
|---|
| 参数: | size – PySide.QtCore.int |
|---|
| 参数: | size – PySide.QtCore.int |
|---|
| 参数: | sharable – PySide.QtCore.bool |
|---|
| 返回类型: | PySide.QtCore.int |
|---|
| 返回类型: | PySide.QtCore.int |
|---|
| 参数: | t – PySide.QtCore.QPointF |
|---|---|
| 返回类型: | PySide.QtCore.bool |
| 参数: | r – PySide.QtGui.QPolygonF |
|---|---|
| 返回类型: | 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.
| 参数: | other – PySide.QtGui.QPolygonF |
|---|
Swaps polygon other with this polygon. This operation is very fast and never fails.
| 返回类型: |
|---|
| 返回类型: | PySide.QtGui.QPolygon |
|---|
创建和返回 PySide.QtGui.QPolygon by converting each PySide.QtCore.QPointF 到 PySide.QtCore.QPoint .
另请参阅
QPointF.toPoint()
| 参数: |
|
|---|
这是重载函数。
Translates all points in the polygon by ( dx , dy ).
| 参数: | offset – PySide.QtCore.QPointF |
|---|
Translate all points in the polygon by the given offset .
| 参数: |
|
|---|---|
| 返回类型: |
这是重载函数。
Returns a copy of the polygon that is translated by ( dx , dy ).
| 参数: | offset – PySide.QtCore.QPointF |
|---|---|
| 返回类型: | PySide.QtGui.QPolygonF |
Returns a copy of the polygon that is translated by the given offset .
| 参数: | r – PySide.QtGui.QPolygonF |
|---|---|
| 返回类型: | 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.
| 参数: | i – PySide.QtCore.int |
|---|---|
| 返回类型: | PySide.QtCore.QPointF |
| 参数: |
|
|---|---|
| 返回类型: |