Definition at line 67 of file qpainterpath.h.
#include <qpainterpath.h>
Classes |
|
| class | Element |
Public Types |
|
| enum | ElementType { MoveToElement, LineToElement, CurveToElement, CurveToDataElement } |
Public Member Functions |
|
| QPainterPath () | |
| QPainterPath (const QPointF &startPoint) | |
| QPainterPath (const QPainterPath &other) | |
| QPainterPath & | operator= (const QPainterPath &other) |
| ~QPainterPath () | |
| void | closeSubpath () |
| void | moveTo (const QPointF &p) |
| void | moveTo (qreal x, qreal y) |
| void | lineTo (const QPointF &p) |
| void | lineTo (qreal x, qreal y) |
| void | arcMoveTo (const QRectF &rect, qreal angle) |
| void | arcMoveTo (qreal x, qreal y, qreal w, qreal h, qreal angle) |
| void | arcTo (const QRectF &rect, qreal startAngle, qreal arcLength) |
| void | arcTo (qreal x, qreal y, qreal w, qreal h, qreal startAngle, qreal arcLength) |
| void | cubicTo (const QPointF &ctrlPt1, const QPointF &ctrlPt2, const QPointF &endPt) |
| void | cubicTo (qreal ctrlPt1x, qreal ctrlPt1y, qreal ctrlPt2x, qreal ctrlPt2y, qreal endPtx, qreal endPty) |
| void | quadTo (const QPointF &ctrlPt, const QPointF &endPt) |
| void | quadTo (qreal ctrlPtx, qreal ctrlPty, qreal endPtx, qreal endPty) |
| QPointF | currentPosition () const |
| void | addRect (const QRectF &rect) |
| void | addRect (qreal x, qreal y, qreal w, qreal h) |
| void | addEllipse (const QRectF &rect) |
| void | addEllipse (qreal x, qreal y, qreal w, qreal h) |
| void | addEllipse (const QPointF ¢er, qreal rx, qreal ry) |
| void | addPolygon (const QPolygonF &polygon) |
| void | addText (const QPointF &point, const QFont &f, const QString &text) |
| void | addText (qreal x, qreal y, const QFont &f, const QString &text) |
| void | addPath (const QPainterPath &path) |
| void | addRegion (const QRegion ®ion) |
| void | addRoundedRect (const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode=Qt::AbsoluteSize) |
| void | addRoundedRect (qreal x, qreal y, qreal w, qreal h, qreal xRadius, qreal yRadius, Qt::SizeMode mode=Qt::AbsoluteSize) |
| void | addRoundRect (const QRectF &rect, int xRnd, int yRnd) |
| void | addRoundRect (qreal x, qreal y, qreal w, qreal h, int xRnd, int yRnd) |
| void | addRoundRect (const QRectF &rect, int roundness) |
| void | addRoundRect (qreal x, qreal y, qreal w, qreal h, int roundness) |
| void | connectPath (const QPainterPath &path) |
| bool | contains (const QPointF &pt) const |
| bool | contains (const QRectF &rect) const |
| bool | intersects (const QRectF &rect) const |
| void | translate (qreal dx, qreal dy) |
| void | translate (const QPointF &offset) |
| QPainterPath | translated (qreal dx, qreal dy) const |
| QPainterPath | translated (const QPointF &offset) const |
| QRectF | boundingRect () const |
| QRectF | controlPointRect () const |
| Qt::FillRule | fillRule () const |
| void | setFillRule (Qt::FillRule fillRule) |
| bool | isEmpty () const |
| QPainterPath | toReversed () const |
| QList< QPolygonF > | toSubpathPolygons (const QMatrix &matrix=QMatrix()) const |
| QList< QPolygonF > | toFillPolygons (const QMatrix &matrix=QMatrix()) const |
| QPolygonF | toFillPolygon (const QMatrix &matrix=QMatrix()) const |
| QList< QPolygonF > | toSubpathPolygons (const QTransform &matrix) const |
| QList< QPolygonF > | toFillPolygons (const QTransform &matrix) const |
| QPolygonF | toFillPolygon (const QTransform &matrix) const |
| int | elementCount () const |
| const QPainterPath::Element & | elementAt (int i) const |
| void | setElementPositionAt (int i, qreal x, qreal y) |
| qreal | length () const |
| qreal | percentAtLength (qreal t) const |
| QPointF | pointAtPercent (qreal t) const |
| qreal | angleAtPercent (qreal t) const |
| qreal | slopeAtPercent (qreal t) const |
| bool | intersects (const QPainterPath &p) const |
| bool | contains (const QPainterPath &p) const |
| QPainterPath | united (const QPainterPath &r) const |
| QPainterPath | intersected (const QPainterPath &r) const |
| QPainterPath | subtracted (const QPainterPath &r) const |
| QPainterPath | subtractedInverted (const QPainterPath &r) const |
| QPainterPath | simplified () const |
| bool | operator== (const QPainterPath &other) const |
| bool | operator!= (const QPainterPath &other) const |
| QPainterPath | operator& (const QPainterPath &other) const |
| QPainterPath | operator| (const QPainterPath &other) const |
| QPainterPath | operator+ (const QPainterPath &other) const |
| QPainterPath | operator- (const QPainterPath &other) const |
| QPainterPath & | operator&= (const QPainterPath &other) |
| QPainterPath & | operator|= (const QPainterPath &other) |
| QPainterPath & | operator+= (const QPainterPath &other) |
| QPainterPath & | operator-= (const QPainterPath &other) |
Friends |
|
| class | QPainterPathData |
| class | QPainterPathStroker |
| class | QPainterPathStrokerPrivate |
| class | QMatrix |
| class | QTransform |
| class | QVectorPath |
| Q_GUI_EXPORT const QVectorPath & | qtVectorPathForPath (const QPainterPath &) |
| Q_GUI_EXPORT QDataStream & | operator<< (QDataStream &, const QPainterPath &) |
| Q_GUI_EXPORT QDataStream & | operator>> (QDataStream &, QPainterPath &) |
| enum ElementType |
Definition at line 70 of file qpainterpath.h.
| QPainterPath | ( | ) |
| QPainterPath | ( | const QPointF & | startPoint | ) | [explicit] |
| QPainterPath | ( | const QPainterPath & | other | ) |
| ~QPainterPath | ( | ) |
| QPainterPath& operator= | ( | const QPainterPath & | other | ) |
| void closeSubpath | ( | ) |
| void moveTo | ( | const QPointF & | p | ) |
| void moveTo | ( | qreal | x, |
| qreal | y | ||
| ) | [inline] |
Definition at line 298 of file qpainterpath.h.
| void lineTo | ( | const QPointF & | p | ) |
| void lineTo | ( | qreal | x, |
| qreal | y | ||
| ) | [inline] |
Definition at line 303 of file qpainterpath.h.
| void arcMoveTo | ( | const QRectF & | rect, |
| qreal | angle | ||
| ) |
| void arcMoveTo | ( | qreal | x, |
| qreal | y, | ||
| qreal | w, | ||
| qreal | h, | ||
| qreal | angle | ||
| ) | [inline] |
Definition at line 313 of file qpainterpath.h.
| void arcTo | ( | const QRectF & | rect, |
| qreal | startAngle, | ||
| qreal | arcLength | ||
| ) |
| void arcTo | ( | qreal | x, |
| qreal | y, | ||
| qreal | w, | ||
| qreal | h, | ||
| qreal | startAngle, | ||
| qreal | arcLength | ||
| ) | [inline] |
Definition at line 308 of file qpainterpath.h.
| void cubicTo | ( | qreal | ctrlPt1x, |
| qreal | ctrlPt1y, | ||
| qreal | ctrlPt2x, | ||
| qreal | ctrlPt2y, | ||
| qreal | endPtx, | ||
| qreal | endPty | ||
| ) | [inline] |
Definition at line 318 of file qpainterpath.h.
| void quadTo | ( | qreal | ctrlPtx, |
| qreal | ctrlPty, | ||
| qreal | endPtx, | ||
| qreal | endPty | ||
| ) | [inline] |
Definition at line 325 of file qpainterpath.h.
| QPointF currentPosition | ( | ) | const |
| void addRect | ( | const QRectF & | rect | ) |
| void addRect | ( | qreal | x, |
| qreal | y, | ||
| qreal | w, | ||
| qreal | h | ||
| ) | [inline] |
Definition at line 340 of file qpainterpath.h.
| void addEllipse | ( | const QRectF & | rect | ) |
| void addEllipse | ( | qreal | x, |
| qreal | y, | ||
| qreal | w, | ||
| qreal | h | ||
| ) | [inline] |
Definition at line 330 of file qpainterpath.h.
{
addEllipse(QRectF(x, y, w, h));
}
| void addEllipse | ( | const QPointF & | center, |
| qreal | rx, | ||
| qreal | ry | ||
| ) | [inline] |
Definition at line 335 of file qpainterpath.h.
{
addEllipse(QRectF(center.x() - rx, center.y() - ry, 2 * rx, 2 * ry));
}
| void addPolygon | ( | const QPolygonF & | polygon | ) |
Definition at line 376 of file qpainterpath.h.
| void addPath | ( | const QPainterPath & | path | ) |
| void addRegion | ( | const QRegion & | region | ) |
| void addRoundedRect | ( | const QRectF & | rect, |
| qreal | xRadius, | ||
| qreal | yRadius, | ||
| Qt::SizeMode | mode =
Qt::AbsoluteSize |
||
| ) |
| void addRoundedRect | ( | qreal | x, |
| qreal | y, | ||
| qreal | w, | ||
| qreal | h, | ||
| qreal | xRadius, | ||
| qreal | yRadius, | ||
| Qt::SizeMode | mode =
Qt::AbsoluteSize |
||
| ) | [inline] |
Definition at line 345 of file qpainterpath.h.
{
addRoundedRect(QRectF(x, y, w, h), xRadius, yRadius, mode);
}
| void addRoundRect | ( | const QRectF & | rect, |
| int | xRnd, | ||
| int | yRnd | ||
| ) |
| void addRoundRect | ( | qreal | x, |
| qreal | y, | ||
| qreal | w, | ||
| qreal | h, | ||
| int | xRnd, | ||
| int | yRnd | ||
| ) | [inline] |
Definition at line 352 of file qpainterpath.h.
{
addRoundRect(QRectF(x, y, w, h), xRnd, yRnd);
}
| void addRoundRect | ( | const QRectF & | rect, |
| int | roundness | ||
| ) | [inline] |
Definition at line 358 of file qpainterpath.h.
| void addRoundRect | ( | qreal | x, |
| qreal | y, | ||
| qreal | w, | ||
| qreal | h, | ||
| int | roundness | ||
| ) | [inline] |
Definition at line 370 of file qpainterpath.h.
{
addRoundRect(QRectF(x, y, w, h), roundness);
}
| void connectPath | ( | const QPainterPath & | path | ) |
| bool contains | ( | const QPointF & | pt | ) | const |
| bool contains | ( | const QRectF & | rect | ) | const |
| bool intersects | ( | const QRectF & | rect | ) | const |
| void translate | ( | qreal | dx, |
| qreal | dy | ||
| ) |
| void translate | ( | const QPointF & | offset | ) | [inline] |
Definition at line 381 of file qpainterpath.h.
| QPainterPath translated | ( | qreal | dx, |
| qreal | dy | ||
| ) | const |
| QPainterPath translated | ( | const QPointF & | offset | ) | const [inline] |
Definition at line 384 of file qpainterpath.h.
{ return translated(offset.x(), offset.y()); }
| QRectF boundingRect | ( | ) | const |
| QRectF controlPointRect | ( | ) | const |
| Qt::FillRule fillRule | ( | ) | const |
| void setFillRule | ( | Qt::FillRule | fillRule | ) |
| bool isEmpty | ( | ) | const [inline] |
Definition at line 387 of file qpainterpath.h.
{
return !d_ptr || (d_ptr->elements.size() == 1 && d_ptr->elements.first().type == MoveToElement);
}
| QPainterPath toReversed | ( | ) | const |
| QList<QPolygonF> toSubpathPolygons | ( | const QTransform & | matrix | ) | const |
| QList<QPolygonF> toFillPolygons | ( | const QTransform & | matrix | ) | const |
| QPolygonF toFillPolygon | ( | const QTransform & | matrix | ) | const |
| int elementCount | ( | ) | const [inline] |
Definition at line 392 of file qpainterpath.h.
{
return d_ptr ? d_ptr->elements.size() : 0;
}
| const QPainterPath::Element & elementAt | ( | int | i | ) | const [inline] |
Definition at line 397 of file qpainterpath.h.
{
Q_ASSERT(d_ptr);
Q_ASSERT(i >= 0 && i < elementCount());
return d_ptr->elements.at(i);
}
| void setElementPositionAt | ( | int | i, |
| qreal | x, | ||
| qreal | y | ||
| ) | [inline] |
Definition at line 404 of file qpainterpath.h.
{
Q_ASSERT(d_ptr);
Q_ASSERT(i >= 0 && i < elementCount());
detach();
QPainterPath::Element &e = d_ptr->elements[i];
e.x = x;
e.y = y;
}
| qreal length | ( | ) | const |
| qreal percentAtLength | ( | qreal | t | ) | const |
| QPointF pointAtPercent | ( | qreal | t | ) | const |
| qreal angleAtPercent | ( | qreal | t | ) | const |
| qreal slopeAtPercent | ( | qreal | t | ) | const |
| bool intersects | ( | const QPainterPath & | p | ) | const |
| bool contains | ( | const QPainterPath & | p | ) | const |
| QPainterPath united | ( | const QPainterPath & | r | ) | const |
| QPainterPath intersected | ( | const QPainterPath & | r | ) | const |
| QPainterPath subtracted | ( | const QPainterPath & | r | ) | const |
| QPainterPath subtractedInverted | ( | const QPainterPath & | r | ) | const |
| QPainterPath simplified | ( | ) | const |
| bool operator== | ( | const QPainterPath & | other | ) | const |
| bool operator!= | ( | const QPainterPath & | other | ) | const |
| QPainterPath operator& | ( | const QPainterPath & | other | ) | const |
| QPainterPath operator| | ( | const QPainterPath & | other | ) | const |
| QPainterPath operator+ | ( | const QPainterPath & | other | ) | const |
| QPainterPath operator- | ( | const QPainterPath & | other | ) | const |
| QPainterPath& operator&= | ( | const QPainterPath & | other | ) |
| QPainterPath& operator|= | ( | const QPainterPath & | other | ) |
| QPainterPath& operator+= | ( | const QPainterPath & | other | ) |
| QPainterPath& operator-= | ( | const QPainterPath & | other | ) |
friend class QPainterPathData
[friend] |
Definition at line 218 of file qpainterpath.h.
friend class QPainterPathStroker
[friend] |
Definition at line 219 of file qpainterpath.h.
friend class QPainterPathStrokerPrivate
[friend] |
Definition at line 220 of file qpainterpath.h.
friend class QMatrix [friend] |
Definition at line 221 of file qpainterpath.h.
friend class QTransform [friend] |
Definition at line 222 of file qpainterpath.h.
friend class QVectorPath
[friend] |
Definition at line 223 of file qpainterpath.h.
| Q_GUI_EXPORT const QVectorPath& qtVectorPathForPath | ( | const QPainterPath & | ) | [friend] |
| Q_GUI_EXPORT QDataStream& operator<< | ( | QDataStream & | , |
| const QPainterPath & | |||
| ) | [friend] |
| Q_GUI_EXPORT QDataStream& operator>> | ( | QDataStream & | , |
| QPainterPath & | |||
| ) | [friend] |