Home · Overviews · Examples 

QPolygonF Class Reference
[com.trolltech.qt.gui module]

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


Detailed Description

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

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 QMatrix::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.

See also QVector, QPolygon, and QLineF.


Copyright © 2007 Trolltech Trademarks
Qt Jambi 4.3.2_01