QPolygonF Class
The QPolygonF class provides a vector of points using floating point precision. More...
| Header: | #include <QPolygonF> |
| qmake: | QT += gui |
| Inherits: | QVector |
Note: All functions in this class are reentrant.
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:
QPolygonF polygon;
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 QTransform::map() function for more general transformations of QPolygonFs.
QPolygonF also provides the isClosed() function to determine whether a polygon's 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.