QPolygonF Class Reference
|
QPolygonF () | |
QPolygonF ( int size ) | |
QPolygonF ( const QPolygonF & polygon ) | |
QPolygonF ( const QVector<QPointF> & points ) | |
QPolygonF ( const QRectF & rectangle ) | |
QPolygonF ( const QPolygon & polygon ) | |
~QPolygonF () | |
QRectF | boundingRect () const |
bool | containsPoint ( const QPointF & point, Qt::FillRule fillRule ) const |
QPolygonF | intersected ( const QPolygonF & r ) const |
bool | isClosed () const |
QPolygonF | subtracted ( const QPolygonF & r ) const |
QPolygon | toPolygon () const |
void | translate ( const QPointF & offset ) |
void | translate ( qreal dx, qreal dy ) |
QPolygonF | translated ( const QPointF & offset ) const |
QPolygonF | translated ( qreal dx, qreal dy ) const |
QPolygonF | united ( const QPolygonF & r ) const |
QDataStream & | operator<< ( QDataStream & stream, const QPolygonF & polygon ) |
QDataStream & | operator>> ( QDataStream & stream, QPolygonF & polygon ) |
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.
Constructs a polygon with no points.
See also QVector::isEmpty().
Constructs a polygon of the given size. Creates an empty polygon if size == 0.
See also QVector::isEmpty().
Constructs a copy of the given polygon.
Constructs a polygon containing the specified points.
Constructs a closed polygon from the specified rectangle.
The polygon contains the four vertices of the rectangle in clockwise order starting and ending with the top-left vertex.
See also isClosed().
Constructs a float based polygon from the specified integer based polygon.
See also toPolygon().
Destroys the polygon.
Returns the bounding rectangle of the polygon, or QRectF(0,0,0,0) if the polygon is empty.
See also QVector::isEmpty().
Returns true if the given point is inside the polygon according to the specified fillRule; otherwise returns false.
Эта функция была введена в Qt 4.3.
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.
Эта функция была введена в Qt 4.3.
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 QVector::first() and QVector::last().
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.
Эта функция была введена в Qt 4.3.
Creates and returns a QPolygon by converting each QPointF to a QPoint.
See also QPointF::toPoint().
Translate all points in the polygon by the given offset.
See also translated().
Это перегруженная функция.
Translates all points in the polygon by (dx, dy).
See also translated().
Returns a copy of the polygon that is translated by the given offset.
Эта функция была введена в Qt 4.6.
Смотрите также translate().
Это перегруженная функция.
Returns a copy of the polygon that is translated by (dx, dy).
Эта функция была введена в Qt 4.6.
Смотрите также translate().
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.
Эта функция была введена в Qt 4.3.
See also intersected() and subtracted().
Writes the given polygon to the given stream, and returns a reference to the stream.
Смотрите также Формат операторов QDataStream.
Reads a polygon from the given stream into the given polygon, and returns a reference to the stream.
Смотрите также Формат операторов QDataStream.
Авторские права © 2010 Nokia Corporation и/или её дочерние компании | Торговые марки | Qt 4.6.4 |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |