128 <<
QPoint(
r.x() +
r.width(),
r.y() +
r.height())
155 if (dx == 0 && dy == 0)
185 copy.translate(dx, dy);
283 va_start(ap, firsty);
344 va_start(ap, firsty);
391 return QRect(0, 0, 0, 0);
392 int minx, maxx, miny, maxy;
393 minx = maxx = pd->
x();
394 miny = maxy = pd->
y();
396 for (; pd != pe; ++pd) {
399 else if (pd->
x() > maxx)
403 else if (pd->
y() > maxy)
419#ifndef QT_NO_DEBUG_STREAM
423 dbg.nospace() <<
"QPolygon(";
424 for (
int i = 0;
i <
a.size(); ++
i)
425 dbg.nospace() <<
a.at(
i);
426 dbg.nospace() <<
')';
516 for (
int i=0;
i<
a.size(); ++
i)
593 return QRectF(0, 0, 0, 0);
594 qreal minx, maxx, miny, maxy;
595 minx = maxx = pd->
x();
596 miny = maxy = pd->
y();
601 else if (pd->
x() > maxx)
605 else if (pd->
y() > maxy)
609 return QRectF(minx,miny, maxx - minx, maxy - miny);
624 a.append(
at(
i).toPoint());
655#ifndef QT_NO_DATASTREAM
692#ifndef QT_NO_DATASTREAM
730 a.reserve(
a.size() + (
int)
len);
732 for (
i = 0;
i <
len; ++
i) {
740#ifndef QT_NO_DEBUG_STREAM
744 dbg.nospace() <<
"QPolygonF(";
745 for (
int i = 0;
i <
a.size(); ++
i)
746 dbg.nospace() <<
a.at(
i);
747 dbg.nospace() <<
')';
766 int winding_number = 0;
770 for (
int i = 1;
i <
size(); ++
i) {
777 if (last_pt != last_start)
781 ? (winding_number != 0)
782 : ((winding_number % 2) != 0));
797 int winding_number = 0;
801 for (
int i = 1;
i <
size(); ++
i) {
808 if (last_pt != last_start)
812 ? (winding_number != 0)
813 : ((winding_number % 2) != 0));
\inmodule QtCore\reentrant
qsizetype size() const noexcept
const_pointer constData() const noexcept
bool isEmpty() const noexcept
void reserve(qsizetype size)
void resize(qsizetype size)
void append(parameter_type t)
QPainterPath subtracted(const QPainterPath &r) const
void addPolygon(const QPolygonF &polygon)
Adds the given polygon to the path as an (unclosed) subpath.
QPolygonF toFillPolygon(const QTransform &matrix=QTransform()) const
Converts the path into a polygon using the QTransform matrix, and returns the polygon.
bool intersects(const QRectF &rect) const
Returns true if any point in the given rectangle intersects the path; otherwise returns false.
QPainterPath united(const QPainterPath &r) const
QPainterPath intersected(const QPainterPath &r) const
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
\inmodule QtCore\reentrant
constexpr int x() const noexcept
Returns the x coordinate of this point.
constexpr int y() const noexcept
Returns the y coordinate of this point.
The QPolygonF class provides a list of points using floating point precision.
QPolygon Q_GUI_EXPORT toPolygon() const
Creates and returns a QPolygon by converting each QPointF to a QPoint.
Q_GUI_EXPORT QPolygonF intersected(const QPolygonF &r) const
Q_GUI_EXPORT bool containsPoint(const QPointF &pt, Qt::FillRule fillRule) const
Q_GUI_EXPORT QPolygonF subtracted(const QPolygonF &r) const
Q_GUI_EXPORT QPolygonF united(const QPolygonF &r) const
Q_GUI_EXPORT bool intersects(const QPolygonF &r) const
void translate(qreal dx, qreal dy)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QPolygonF()=default
Constructs a polygon with no points.
QRectF Q_GUI_EXPORT boundingRect() const
Returns the bounding rectangle of the polygon, or QRectF(0,0,0,0) if the polygon is empty.
QPolygonF translated(qreal dx, qreal dy) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QPolygon class provides a list of points using integer precision.
Q_GUI_EXPORT bool intersects(const QPolygon &r) const
Q_GUI_EXPORT QPolygon subtracted(const QPolygon &r) const
Q_GUI_EXPORT void translate(int dx, int dy)
Translates all points in the polygon by ({dx}, {dy}).
QPolygon()=default
Constructs a polygon with no points.
Q_GUI_EXPORT QPolygon translated(int dx, int dy) const
Returns a copy of the polygon that is translated by ({dx}, {dy}).
Q_GUI_EXPORT bool containsPoint(const QPoint &pt, Qt::FillRule fillRule) const
Q_GUI_EXPORT void putPoints(int index, int nPoints, const int *points)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Q_GUI_EXPORT QPolygon united(const QPolygon &r) const
Q_GUI_EXPORT void setPoint(int index, int x, int y)
Sets the point at the given index to the point specified by ({x}, {y}).
Q_GUI_EXPORT QRect boundingRect() const
Returns the bounding rectangle of the polygon, or QRect(0, 0, 0, 0) if the polygon is empty.
Q_GUI_EXPORT void point(int i, int *x, int *y) const
Extracts the coordinates of the point at the given index to {x} and *{y} (if they are valid pointers)...
Q_GUI_EXPORT QPolygon intersected(const QPolygon &r) const
Q_GUI_EXPORT void setPoints(int nPoints, const int *points)
Resizes the polygon to nPoints and populates it with the given points.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
Combined button and popup list for selecting options.
static jboolean copy(JNIEnv *, jobject)
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLuint GLfloat GLfloat GLfloat GLfloat y1
GLuint GLfloat GLfloat GLfloat x1
GLenum GLuint GLintptr offset
GLfixed GLfixed GLint GLint GLfixed points
GLfixed GLfixed GLfixed y2
QDataStream & operator>>(QDataStream &s, QPolygon &a)
static QT_BEGIN_NAMESPACE void qt_polygon_isect_line(const QPointF &p1, const QPointF &p2, const QPointF &pos, int *winding)
QDebug operator<<(QDebug dbg, const QPolygon &a)