[QtGui module]

该QPolygonF类提供了使用浮点精度点的矢量。More…

Methods

  • __init__ (self)
  • __init__ (self, QPolygonF a)
  • __init__ (self, list-of-QPointF v)
  • __init__ (self, QRectF r)
  • __init__ (self, QPolygon a)
  • __init__ (self, int asize)
  • append (self, QPointF value)
  • QPointF at (self, int i)
  • QRectF boundingRect (self)
  • clear (self)
  • bool contains (self, QPointF value)
  • bool containsPoint (self, QPointF pt, Qt.FillRule fillRule)
  • int count (self, QPointF value)
  • int count (self)
  • sip.voidptr data (self)
  • fill (self, QPointF value, int size = -1)
  • QPointF first (self)
  • int indexOf (self, QPointF value, int from = 0)
  • insert (self, int i, QPointF value)
  • QPolygonF intersected (self, QPolygonF r)
  • bool isClosed (self)
  • bool isEmpty (self)
  • QPointF last (self)
  • int lastIndexOf (self, QPointF value, int from = -1)
  • QPolygonF mid (self, int pos, int length = -1)
  • prepend (self, QPointF value)
  • remove (self, int i)
  • remove (self, int i, int count)
  • replace (self, int i, QPointF value)
  • int size (self)
  • QPolygonF subtracted (self, QPolygonF r)
  • swap (self, QPolygonF other)
  • QPolygon toPolygon (self)
  • translate (self, QPointF offset)
  • translate (self, float dx, float dy)
  • QPolygonF translated (self, QPointF offset)
  • QPolygonF translated (self, float dx, float dy)
  • QPolygonF united (self, QPolygonF r)
  • QPointF value (self, int i)
  • QPointF value (self, int i, QPointF defaultValue)

Special Methods

  • QPolygonF __add__ (self, QPolygonF other)
  • int __contains__ (self, QPointF value)
  • __delitem__ (self, int i)
  • __delitem__ (self, slice slice)
  • bool __eq__ (self, QPolygonF other)
  • QPointF __getitem__ (self, int i)
  • QPolygonF __getitem__ (self, slice slice)
  • QPolygonF __iadd__ (self, QPolygonF other)
  • QPolygonF __iadd__ (self, QPointF value)
  • __len__ (self)
  • object __lshift__ (self, QPointF value)
  • QPolygonF __mul__ (self, QMatrix m)
  • QPolygonF __mul__ (self, QTransform m)
  • bool __ne__ (self, QPolygonF other)
  • __setitem__ (self, int i, QPointF value)
  • __setitem__ (self, slice slice, QPolygonF list)

Detailed Description

该QPolygonF类提供了使用浮点精度点的矢量。

一个QPolygonF是QVector\u003cQPointF\u003e 。把点添加到QPolygonF最简单的方法是使用它的流媒体运营商,如下图所示:

  1. QPolygonF polygon;
  2. polygon << [QPointF](docs_qpointf.html)(10.4, 20.5) << [QPointF](docs_qpointf.html)(20.2, 30.2);

除了由所提供的功能QVector, QPolygonF提供boundingRect()和translate( )用于几何运算功能。使用QMatrix.map()函数QPolygonFs的更一般的变换。

QPolygonF还提供了isClosed()函数来确定一个多边形的起点和终点是否是相同的,并且toPolygon( )函数返回此多边形的整数精度副本。

该QPolygonF类是implicitly shared


Method Documentation

  1. QPolygonF.__init__ (self)

构造一个多边形,没有分。

See also QVector.isEmpty( ) 。

  1. QPolygonF.__init__ (self, QPolygonF a)

构造的给定的多边形size。创建空的多边形,如果size== 0 。

See also QVector.isEmpty( ) 。

  1. QPolygonF.__init__ (self, list-of-QPointF v)

构造给定的一个副本polygon

  1. QPolygonF.__init__ (self, QRectF r)

构建了含有指定一个多边形points

  1. QPolygonF.__init__ (self, QPolygon a)

构造一个封闭的多边形从指定的rectangle

多边形包含四个顶点按顺时针顺序矩形的开始,并与左上顶点结束。

See also isClosed( ) 。

  1. QPolygonF.__init__ (self, int asize)

构造从指定的整数根据一个基于浮动多边形polygon

See also toPolygon( ) 。

  1. QPolygonF.append (self, QPointF value)
  1. QPointF QPolygonF.at (self, int i)
  1. QRectF QPolygonF.boundingRect (self)

返回多边形的边界矩形,或QRectF(0,0,0,0) ,如果多边形是空的。

See also QVector.isEmpty( ) 。

  1. QPolygonF.clear (self)
  1. bool QPolygonF.contains (self, QPointF value)
  1. bool QPolygonF.containsPoint (self, QPointF pt, Qt.FillRule fillRule)

返回True如果给定的point在多边形内根据指定的fillRule否则返回False 。

此功能被引入Qt的4.3 。

  1. int QPolygonF.count (self, QPointF value)
  1. int QPolygonF.count (self)
  1. sip.voidptr QPolygonF.data (self)
  1. QPolygonF.fill (self, QPointF value, int size = -1)
  1. QPointF QPolygonF.first (self)

[

  1. int QPolygonF.indexOf (self, QPointF value, int from = 0)
  1. QPolygonF.insert (self, int i, QPointF value)

](docs_qpointf.html)

  1. QPolygonF QPolygonF.intersected (self, QPolygonF r)

[

返回一个多边形是这个多边形的交点r

对多边形集合运算将视作为多边形区域。非封闭的多边形将被隐式关闭处理。

此功能被引入Qt的4.3 。

  1. bool QPolygonF.isClosed (self)

返回True如果多边形是封闭的,否则返回False 。

多边形被认为是封闭的,如果起点和终点都是平等的。

](docs_qpolygonf.html)

See also QVector.first()和QVector.last( ) 。

  1. bool QPolygonF.isEmpty (self)
  1. QPointF QPolygonF.last (self)

[

  1. int QPolygonF.lastIndexOf (self, QPointF value, int from = -1)

](docs_qpointf.html)

  1. QPolygonF QPolygonF.mid (self, int pos, int length = -1)

[

  1. QPolygonF.prepend (self, QPointF value)
  1. QPolygonF.remove (self, int i)
  1. QPolygonF.remove (self, int i, int count)
  1. QPolygonF.replace (self, int i, QPointF value)
  1. int QPolygonF.size (self)

](docs_qpolygonf.html)

  1. QPolygonF QPolygonF.subtracted (self, QPolygonF r)

[

返回一个多边形是r减去这个多边形。

对多边形集合运算将视作为多边形区域。非封闭的多边形将被隐式关闭处理。

此功能被引入Qt的4.3 。

  1. QPolygonF.swap (self, QPolygonF other)

掉期多边形other与此多边形。这个操作是非常快的,而且永远不会。

此功能被引入Qt的4.8 。

](docs_qpolygonf.html)

  1. QPolygon QPolygonF.toPolygon (self)

创建并返回一个QPolygon把每个QPointFQPoint

See also QPointF.toPoint( ) 。

  1. QPolygonF.translate (self, QPointF offset)

翻译所有点在多边形由给定的offset

See also translated( ) 。

  1. QPolygonF.translate (self, float dx, float dy)

这是一个重载函数。

由(将所有的点在多边形dxdy) 。

See also translated( ) 。

  1. QPolygonF QPolygonF.translated (self, QPointF offset)

[

返回该多边形的一个副本,是由给定的翻译offset

此功能被引入Qt的4.6 。

](docs_qpolygonf.html)

See also translate( ) 。

  1. QPolygonF QPolygonF.translated (self, float dx, float dy)

[

这是一个重载函数。

返回由(翻译多边形的副本dxdy) 。

此功能被引入Qt的4.6 。

](docs_qpolygonf.html)

See also translate( ) 。

  1. QPolygonF QPolygonF.united (self, QPolygonF r)

[

返回一个多边形是这个多边形和工会r

对多边形集合运算将视作为多边形区域。非封闭的多边形将被隐式关闭处理。

此功能被引入Qt的4.3 。

](docs_qpolygonf.html)

See also intersected()和subtracted( ) 。

  1. QPointF QPolygonF.value (self, int i)
  1. QPointF QPolygonF.value (self, int i, QPointF defaultValue)
  1. QPolygonF QPolygonF.__add__ (self, QPolygonF other)

[

  1. int QPolygonF.__contains__ (self, QPointF value)
  1. QPolygonF.__delitem__ (self, int i)
  1. QPolygonF.__delitem__ (self, slice slice)
  1. bool QPolygonF.__eq__ (self, QPolygonF other)

](docs_qpolygonf.html)

  1. QPointF QPolygonF.__getitem__ (self, int i)
  1. QPolygonF QPolygonF.__getitem__ (self, slice slice)
  1. QPolygonF QPolygonF.__iadd__ (self, QPolygonF other)
  1. QPolygonF QPolygonF.__iadd__ (self, QPointF value)

[

  1. QPolygonF.__len__ (self)
  1. object QPolygonF.__lshift__ (self, QPointF value)

](docs_qpolygonf.html)

  1. QPolygonF QPolygonF.__mul__ (self, QMatrix m)
  1. QPolygonF QPolygonF.__mul__ (self, QTransform m)

[

  1. bool QPolygonF.__ne__ (self, QPolygonF other)
  1. QPolygonF.__setitem__ (self, int i, QPointF value)
  1. QPolygonF.__setitem__ (self, slice slice, QPolygonF list)

](docs_qpolygonf.html)