QPolygonF露

The QPolygonF class provides a vector of points using floating point precision. More鈥�

Inheritance diagram of PySide2.QtGui.QPolygonF

Synopsis露

Functions露

Static functions露

Detailed Description露

A QPolygonF is a QVector < QPointF >. The easiest way to add points to a 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 , QPolygonF provides the boundingRect() and translate() functions for geometry operations. Use the map() function for more general transformations of QPolygonFs.

QPolygonF also provides the isClosed() function to determine whether a polygon鈥檚 start and end points are the same, and the toPolygon() function returning an integer precision copy of this polygon.

The QPolygonF class is implicitly shared .

See also

QVector QPolygon QLineF

class PySide2.QtGui.QPolygonF露

PySide2.QtGui.QPolygonF(v)

PySide2.QtGui.QPolygonF(a)

PySide2.QtGui.QPolygonF(a)

PySide2.QtGui.QPolygonF(r)

PySide2.QtGui.QPolygonF(v)

PySide2.QtGui.QPolygonF(size)

param size:

int

param a:

PySide2.QtGui.QPolygon

param r:

PySide2.QtCore.QRectF

param v:

Constructs a polygon with no points.

See also

isEmpty()

Constructs a polygon of the given size . Creates an empty polygon if size == 0.

See also

isEmpty()

PySide2.QtGui.QPolygonF.append(t)露
Parameters:

t 鈥� PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.append(t)
Parameters:

t 鈥� PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.append(l)
Parameters:

l 鈥�

PySide2.QtGui.QPolygonF.at(i)露
Parameters:

i 鈥� int

Return type:

PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.back()露
Return type:

PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.boundingRect()露
Return type:

PySide2.QtCore.QRectF

Returns the bounding rectangle of the polygon, or QRectF (0,0,0,0) if the polygon is empty.

See also

isEmpty()

PySide2.QtGui.QPolygonF.capacity()露
Return type:

int

PySide2.QtGui.QPolygonF.clear()露
PySide2.QtGui.QPolygonF.constData()露
Return type:

PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.constFirst()露
Return type:

PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.constLast()露
Return type:

PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.contains(t)露
Parameters:

t 鈥� PySide2.QtCore.QPointF

Return type:

bool

PySide2.QtGui.QPolygonF.containsPoint(pt, fillRule)露
Parameters:
Return type:

bool

Returns true if the given point is inside the polygon according to the specified fillRule ; otherwise returns false .

PySide2.QtGui.QPolygonF.count()露
Return type:

int

PySide2.QtGui.QPolygonF.count(t)
Parameters:

t 鈥� PySide2.QtCore.QPointF

Return type:

int

PySide2.QtGui.QPolygonF.data()露
Return type:

PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.empty()露
Return type:

bool

PySide2.QtGui.QPolygonF.endsWith(t)露
Parameters:

t 鈥� PySide2.QtCore.QPointF

Return type:

bool

PySide2.QtGui.QPolygonF.fill(t[, size=-1])露
Parameters:
Return type:

PySide2.QtGui.QPolygonF.first()露
Return type:

PySide2.QtCore.QPointF

static PySide2.QtGui.QPolygonF.fromList(list)露
Parameters:

list 鈥�

Return type:

PySide2.QtGui.QPolygonF.front()露
Return type:

PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.indexOf(t[, from=0])露
Parameters:
Return type:

int

PySide2.QtGui.QPolygonF.insert(i, t)露
Parameters:
PySide2.QtGui.QPolygonF.insert(i, t)
Parameters:
PySide2.QtGui.QPolygonF.insert(i, n, t)
Parameters:
PySide2.QtGui.QPolygonF.intersected(r)露
Parameters:

r 鈥� PySide2.QtGui.QPolygonF

Return type:

PySide2.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.

See also

intersects()

PySide2.QtGui.QPolygonF.intersects(r)露
Parameters:

r 鈥� PySide2.QtGui.QPolygonF

Return type:

bool

Returns true if the current polygon intersects at any point the given polygon p . Also returns true if the current polygon contains or is contained by any part of p .

Set operations on polygons will treat the polygons as areas. Non-closed polygons will be treated as implicitly closed.

See also

intersected()

PySide2.QtGui.QPolygonF.isClosed()露
Return type:

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

first() last()

PySide2.QtGui.QPolygonF.isEmpty()露
Return type:

bool

PySide2.QtGui.QPolygonF.isSharedWith(other)露
Parameters:

other 鈥�

Return type:

bool

PySide2.QtGui.QPolygonF.last()露
Return type:

PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.lastIndexOf(t[, from=-1])露
Parameters:
Return type:

int

PySide2.QtGui.QPolygonF.length()露
Return type:

int

PySide2.QtGui.QPolygonF.mid(pos[, len=-1])露
Parameters:
  • pos 鈥� int

  • len 鈥� int

Return type:

PySide2.QtGui.QPolygonF.move(from, to)露
Parameters:
  • from 鈥� int

  • to 鈥� int

PySide2.QtGui.QPolygonF.__ne__(v)露
Parameters:

v 鈥�

Return type:

bool

PySide2.QtGui.QPolygonF.__mul__(m)露
Parameters:

m 鈥� PySide2.QtGui.QMatrix

Return type:

PySide2.QtGui.QPolygonF

PySide2.QtGui.QPolygonF.__mul__(m)
Parameters:

m 鈥� PySide2.QtGui.QTransform

Return type:

PySide2.QtGui.QPolygonF

PySide2.QtGui.QPolygonF.__add__(l)露
Parameters:

l 鈥�

Return type:

PySide2.QtGui.QPolygonF.__iadd__(t)露
Parameters:

t 鈥� PySide2.QtCore.QPointF

Return type:

PySide2.QtGui.QPolygonF.__iadd__(t)
Parameters:

t 鈥� PySide2.QtCore.QPointF

Return type:

PySide2.QtGui.QPolygonF.__lshift__(t)露
Parameters:

t 鈥� PySide2.QtCore.QPointF

Return type:

PySide2.QtGui.QPolygonF.__eq__(v)露
Parameters:

v 鈥�

Return type:

bool

PySide2.QtGui.QPolygonF.operator[](i)
Parameters:

i 鈥� int

Return type:

PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.pop_back()露
PySide2.QtGui.QPolygonF.pop_front()露
PySide2.QtGui.QPolygonF.prepend(t)露
Parameters:

t 鈥� PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.prepend(t)
Parameters:

t 鈥� PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.push_back(t)露
Parameters:

t 鈥� PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.push_back(t)
Parameters:

t 鈥� PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.push_front(t)露
Parameters:

t 鈥� PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.push_front(t)
Parameters:

t 鈥� PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.remove(i)露
Parameters:

i 鈥� int

PySide2.QtGui.QPolygonF.remove(i, n)
Parameters:
  • i 鈥� int

  • n 鈥� int

PySide2.QtGui.QPolygonF.removeAll(t)露
Parameters:

t 鈥� PySide2.QtCore.QPointF

Return type:

int

PySide2.QtGui.QPolygonF.removeAt(i)露
Parameters:

i 鈥� int

PySide2.QtGui.QPolygonF.removeFirst()露
PySide2.QtGui.QPolygonF.removeLast()露
PySide2.QtGui.QPolygonF.removeOne(t)露
Parameters:

t 鈥� PySide2.QtCore.QPointF

Return type:

bool

PySide2.QtGui.QPolygonF.replace(i, t)露
Parameters:
PySide2.QtGui.QPolygonF.reserve(size)露
Parameters:

size 鈥� int

PySide2.QtGui.QPolygonF.resize(size)露
Parameters:

size 鈥� int

PySide2.QtGui.QPolygonF.setSharable(sharable)露
Parameters:

sharable 鈥� bool

PySide2.QtGui.QPolygonF.shrink_to_fit()露
PySide2.QtGui.QPolygonF.size()露
Return type:

int

PySide2.QtGui.QPolygonF.squeeze()露
PySide2.QtGui.QPolygonF.startsWith(t)露
Parameters:

t 鈥� PySide2.QtCore.QPointF

Return type:

bool

PySide2.QtGui.QPolygonF.subtracted(r)露
Parameters:

r 鈥� PySide2.QtGui.QPolygonF

Return type:

PySide2.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.

PySide2.QtGui.QPolygonF.swap(other)露
Parameters:

other 鈥� PySide2.QtGui.QPolygonF

Swaps polygon other with this polygon. This operation is very fast and never fails.

PySide2.QtGui.QPolygonF.swapItemsAt(i, j)露
Parameters:
  • i 鈥� int

  • j 鈥� int

PySide2.QtGui.QPolygonF.takeAt(i)露
Parameters:

i 鈥� int

Return type:

PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.takeFirst()露
Return type:

PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.takeLast()露
Return type:

PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.toList()露
Return type:

PySide2.QtGui.QPolygonF.toPolygon()露
Return type:

PySide2.QtGui.QPolygon

Creates and returns a QPolygon by converting each QPointF to a QPoint .

See also

toPoint()

PySide2.QtGui.QPolygonF.translate(offset)露
Parameters:

offset 鈥� PySide2.QtCore.QPointF

Translate all points in the polygon by the given offset .

See also

translated()

PySide2.QtGui.QPolygonF.translate(dx, dy)
Parameters:
  • dx 鈥� float

  • dy 鈥� float

This is an overloaded function.

Translates all points in the polygon by (dx , dy ).

See also

translated()

PySide2.QtGui.QPolygonF.translated(offset)露
Parameters:

offset 鈥� PySide2.QtCore.QPointF

Return type:

PySide2.QtGui.QPolygonF

Returns a copy of the polygon that is translated by the given offset .

See also

translate()

PySide2.QtGui.QPolygonF.translated(dx, dy)
Parameters:
  • dx 鈥� float

  • dy 鈥� float

Return type:

PySide2.QtGui.QPolygonF

This is an overloaded function.

Returns a copy of the polygon that is translated by (dx , dy ).

See also

translate()

PySide2.QtGui.QPolygonF.united(r)露
Parameters:

r 鈥� PySide2.QtGui.QPolygonF

Return type:

PySide2.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.

PySide2.QtGui.QPolygonF.value(i)露
Parameters:

i 鈥� int

Return type:

PySide2.QtCore.QPointF

PySide2.QtGui.QPolygonF.value(i, defaultValue)
Parameters:
Return type:

PySide2.QtCore.QPointF