![]() |
Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions | ![]() |
The QPolygonF class provides a vector of points. More...
#include <QPolygonF>
Part of the QtGui module.
Inherits QVector<QPointF>.
Note: All the functions in this class are reentrant.
The QPolygonF class provides a vector of points.
A QPolygonF is a QVector<QPoint>. It is implicitly shared. In addition to the functions provided by QVector, QPolygonF provides some point-specific functions.
For convenient reading and writing of the point data use setPoints(), putPoints(), point(), and setPoint().
For geometry operations use boundingRect() and translate(). There is also the QMatrix::map() function for more general transformations of QPolygonFs.
Among others, QPolygonF is used by QPainter::drawLineSegments(), QPainter::drawPolyline(), QPainter::drawPolygon() and QPainter::drawCubicBezier().
See also QPainter, QMatrix, and QVector.
Constructs a polygon with no points.
See also QVector::isEmpty().
Constructs a polygon with size points. Makes a polygon with no points if size == 0.
See also QVector::isEmpty().
Copy constructor. Constructs a copy of the other polygon.
Constructs a polygon from the given vector of points.
Constructs a closed polygon from the rectangle specified by rect.
The point array just contains the four vertices of the rectangle in clockwise order starting and ending with the top-left vertex.
Constructs a float based polygon from the int based polygon specified by a.
Destroys the point array.
Returns the bounding rectangle of the polygon, or QRect(0,0,0,0) if the array is empty.
Returns true if the polygon is closed; otherwise returns false.
Returns an int based version of the polygon.
Translates all points in the polygon by the given offset.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Translates all points in the polygon by (dx, dy).
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Writes the point array, a to the stream s and returns a reference to the stream.
See also Format of the QDataStream operators.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Reads a point array, a from the stream s and returns a reference to the stream.
See also Format of the QDataStream operators.
Copyright © 2005 Trolltech | Trademarks | Qt 4.0.0-b2 |