Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QPolygon Class Reference

The QPolygon class provides a list of points using integer precision. More...

#include <qpolygon.h>

+ Inheritance diagram for QPolygon:
+ Collaboration diagram for QPolygon:

Public Member Functions

 QPolygon ()=default
 Constructs a polygon with no points.
 
Q_IMPLICIT QPolygon (const QList< QPoint > &v)
 Constructs a polygon containing the specified points.
 
Q_IMPLICIT QPolygon (QList< QPoint > &&v) noexcept
 
Q_IMPLICIT Q_GUI_EXPORT QPolygon (const QRect &r, bool closed=false)
 Constructs a polygon from the given rectangle.
 
Q_GUI_EXPORT QPolygon (int nPoints, const int *points)
 
void swap (QPolygon &other) noexcept
 
Q_GUI_EXPORT operator QVariant () const
 Returns the polygon as a QVariant.
 
Q_GUI_EXPORT void translate (int dx, int dy)
 Translates all points in the polygon by ({dx}, {dy}).
 
void translate (const QPoint &offset)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Translates all points in the polygon by the given offset.
 
Q_GUI_EXPORT QPolygon translated (int dx, int dy) const
 Returns a copy of the polygon that is translated by ({dx}, {dy}).
 
QPolygon translated (const QPoint &offset) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
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).
 
QPoint point (int i) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the point at the given index.
 
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}).
 
void setPoint (int index, const QPoint &p)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the point at the given index to the given point.
 
Q_GUI_EXPORT void setPoints (int nPoints, const int *points)
 Resizes the polygon to nPoints and populates it with the given points.
 
Q_GUI_EXPORT void setPoints (int nPoints, int firstx, int firsty,...)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Resizes the polygon to nPoints and populates it with the points specified by the variable argument list.
 
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 only in what argument(s) it accepts.
 
Q_GUI_EXPORT void putPoints (int index, int nPoints, int firstx, int firsty,...)
 Copies nPoints points from the variable argument list into this polygon from the given index.
 
Q_GUI_EXPORT void putPoints (int index, int nPoints, const QPolygon &from, int fromIndex=0)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Copies nPoints points from the given fromIndex ( 0 by default) in fromPolygon into this polygon, starting at the specified index.
 
Q_GUI_EXPORT bool containsPoint (const QPoint &pt, Qt::FillRule fillRule) const
 
Q_GUI_EXPORT QPolygon united (const QPolygon &r) const
 
Q_GUI_EXPORT QPolygon intersected (const QPolygon &r) const
 
Q_GUI_EXPORT QPolygon subtracted (const QPolygon &r) const
 
Q_GUI_EXPORT bool intersects (const QPolygon &r) const
 
QPolygonF toPolygonF () const
 
- Public Member Functions inherited from QList< QPoint >
 QList (DataPointer dd) noexcept
 
 QList ()=default
 
 QList (qsizetype size)
 
 QList (qsizetype size, parameter_type t)
 
 QList (std::initializer_list< QPoint > args)
 
 QList (InputIterator i1, InputIterator i2)
 
 QList (const String &str)
 
 QList (qsizetype size, Qt::Initialization)
 
QList< QPoint > & operator= (std::initializer_list< QPoint > args)
 
void swap (QList &other) noexcept
 
QTypeTraits::compare_eq_result_container< QList, U > operator== (const QList &other) const
 
QTypeTraits::compare_eq_result_container< QList, U > operator!= (const QList &other) const
 
QTypeTraits::compare_lt_result_container< QList, U > operator< (const QList &other) const noexcept(noexcept(std::lexicographical_compare< typename QList< U >::const_iterator, typename QList::const_iterator >(std::declval< QList< U > >().begin(), std::declval< QList< U > >().end(), other.begin(), other.end())))
 
QTypeTraits::compare_lt_result_container< QList, U > operator> (const QList &other) const noexcept(noexcept(other< std::declval< QList< U > >()))
 
QTypeTraits::compare_lt_result_container< QList, U > operator<= (const QList &other) const noexcept(noexcept(other< std::declval< QList< U > >()))
 
QTypeTraits::compare_lt_result_container< QList, U > operator>= (const QList &other) const noexcept(noexcept(std::declval< QList< U > >()< other))
 
qsizetype size () const noexcept
 
qsizetype count () const noexcept
 
qsizetype count (const AT &t) const noexcept
 
qsizetype length () const noexcept
 
bool isEmpty () const noexcept
 
void resize (qsizetype size)
 
void resize (qsizetype size, parameter_type c)
 
void resizeForOverwrite (qsizetype size)
 
qsizetype capacity () const
 
void reserve (qsizetype size)
 
void squeeze ()
 
void detach ()
 
bool isDetached () const noexcept
 
bool isSharedWith (const QList< QPoint > &other) const
 
pointer data ()
 
const_pointer data () const noexcept
 
const_pointer constData () const noexcept
 
void clear ()
 
const_reference at (qsizetype i) const noexcept
 
reference operator[] (qsizetype i)
 
const_reference operator[] (qsizetype i) const noexcept
 
void append (parameter_type t)
 
void append (const_iterator i1, const_iterator i2)
 
void append (rvalue_ref t)
 
void append (const QList< QPoint > &l)
 
void append (QList< QPoint > &&l)
 
void prepend (rvalue_ref t)
 
void prepend (parameter_type t)
 
reference emplaceBack (Args &&... args)
 
reference emplaceFront (Args &&... args)
 
iterator insert (qsizetype i, parameter_type t)
 
iterator insert (qsizetype i, qsizetype n, parameter_type t)
 
iterator insert (const_iterator before, parameter_type t)
 
iterator insert (const_iterator before, qsizetype n, parameter_type t)
 
iterator insert (const_iterator before, rvalue_ref t)
 
iterator insert (qsizetype i, rvalue_ref t)
 
QListassign (qsizetype n, parameter_type t)
 
QListassign (InputIterator first, InputIterator last)
 
QListassign (std::initializer_list< QPoint > l)
 
iterator emplace (const_iterator before, Args &&... args)
 
iterator emplace (qsizetype i, Args &&... args)
 
void replace (qsizetype i, parameter_type t)
 
void replace (qsizetype i, rvalue_ref t)
 
void remove (qsizetype i, qsizetype n=1)
 
void removeFirst () noexcept
 
void removeLast () noexcept
 
value_type takeFirst ()
 
value_type takeLast ()
 
QList< QPoint > & fill (parameter_type t, qsizetype size=-1)
 
void removeAt (qsizetype i)
 
qsizetype removeAll (const AT &t)
 
bool removeOne (const AT &t)
 
qsizetype removeIf (Predicate pred)
 
QPoint takeAt (qsizetype i)
 
void move (qsizetype from, qsizetype to)
 
iterator begin ()
 
const_iterator begin () const noexcept
 
iterator end ()
 
const_iterator end () const noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
const_iterator constBegin () const noexcept
 
const_iterator constEnd () const noexcept
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const noexcept
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const noexcept
 
const_reverse_iterator crbegin () const noexcept
 
const_reverse_iterator crend () const noexcept
 
iterator erase (const_iterator begin, const_iterator end)
 
iterator erase (const_iterator pos)
 
QPointfirst ()
 
const QPointfirst () const noexcept
 
QList< QPointfirst (qsizetype n) const
 
const QPointconstFirst () const noexcept
 
QPointlast ()
 
const QPointlast () const noexcept
 
QList< QPointlast (qsizetype n) const
 
const QPointconstLast () const noexcept
 
bool startsWith (parameter_type t) const
 
bool endsWith (parameter_type t) const
 
QList< QPointmid (qsizetype pos, qsizetype len=-1) const
 
QList< QPointsliced (qsizetype pos) const
 
QList< QPointsliced (qsizetype pos, qsizetype n) const
 
QPoint value (qsizetype i) const
 
QPoint value (qsizetype i, parameter_type defaultValue) const
 
void swapItemsAt (qsizetype i, qsizetype j)
 
void push_back (parameter_type t)
 
void push_back (rvalue_ref t)
 
void push_front (rvalue_ref t)
 
void push_front (parameter_type t)
 
void pop_back () noexcept
 
void pop_front () noexcept
 
reference emplace_back (Args &&... args)
 
bool empty () const noexcept
 
reference front ()
 
const_reference front () const noexcept
 
reference back ()
 
const_reference back () const noexcept
 
void shrink_to_fit ()
 
QList< QPoint > & operator+= (const QList< QPoint > &l)
 
QList< QPoint > & operator+= (QList< QPoint > &&l)
 
QList< QPoint > & operator+= (parameter_type t)
 
QList< QPoint > & operator+= (rvalue_ref t)
 
QList< QPointoperator+ (const QList< QPoint > &l) const &
 
QList< QPointoperator+ (const QList< QPoint > &l) &&
 
QList< QPointoperator+ (QList< QPoint > &&l) const &
 
QList< QPointoperator+ (QList< QPoint > &&l) &&
 
QList< QPoint > & operator<< (parameter_type t)
 
QList< QPoint > & operator<< (const QList< QPoint > &l)
 
QList< QPoint > & operator<< (QList< QPoint > &&l)
 
QList< QPoint > & operator<< (rvalue_ref t)
 
QList< QPointtoList () const noexcept
 
QList< QPointtoVector () const noexcept
 
- Public Member Functions inherited from QListSpecialMethodsBase< T >
template<typename AT = T>
qsizetype indexOf (const AT &t, qsizetype from=0) const noexcept
 
template<typename AT = T>
qsizetype lastIndexOf (const AT &t, qsizetype from=-1) const noexcept
 
template<typename AT = T>
bool contains (const AT &t) const noexcept
 

Related Symbols

(Note that these are not member symbols.)

QDataStreamoperator<< (QDataStream &stream, const QPolygon &polygon)
 
QDataStreamoperator>> (QDataStream &stream, QPolygon &polygon)
 

Additional Inherited Members

- Public Types inherited from QList< QPoint >
using Type
 
using value_type
 
using pointer
 
using const_pointer
 
using reference
 
using const_reference
 
using size_type
 
using difference_type
 
using parameter_type
 
using rvalue_ref
 
using Iterator
 
using ConstIterator
 
using reverse_iterator
 
using const_reverse_iterator
 
- Static Public Member Functions inherited from QList< QPoint >
static qsizetype max_size () noexcept
 
static QList< QPointfromList (const QList< QPoint > &list) noexcept
 
static QList< QPointfromVector (const QList< QPoint > &vector) noexcept
 
static QList< QPointfromReadOnlyData (const QPoint(&t)[N]) noexcept
 
- Protected Types inherited from QListSpecialMethodsBase< T >
using Self = QList<T>
 
- Protected Member Functions inherited from QListSpecialMethods< T >
 ~QListSpecialMethods ()=default
 
- Protected Member Functions inherited from QListSpecialMethodsBase< T >
 ~QListSpecialMethodsBase ()=default
 
Selfself ()
 
const Selfself () const
 

Detailed Description

The QPolygon class provides a list of points using integer precision.

\inmodule QtGui

\reentrant

A QPolygon object is a QList<QPoint>. The easiest way to add points to a QPolygon is to use QList's streaming operator, as illustrated below:

In addition to the functions provided by QList, QPolygon provides some point-specific functions.

Each point in a polygon can be retrieved by passing its index to the point() function. To populate the polygon, QPolygon provides the setPoint() function to set the point at a given index, the setPoints() function to set all the points in the polygon (resizing it to the given number of points), and the putPoints() function which copies a number of given points into the polygon from a specified index (resizing the polygon if necessary).

QPolygon provides the boundingRect() and translate() functions for geometry functions. Use the QTransform::map() function for more general transformations of QPolygons.

The QPolygon class is \l {Implicit Data Sharing}{implicitly shared}.

See also
QList, QPolygonF, QLine

Definition at line 22 of file qpolygon.h.

Constructor & Destructor Documentation

◆ QPolygon() [1/5]

QPolygon::QPolygon ( )
default

Constructs a polygon with no points.

See also
QList::isEmpty()

◆ QPolygon() [2/5]

QPolygon::QPolygon ( const QList< QPoint > & points)
inline

Constructs a polygon containing the specified points.

See also
setPoints()

Definition at line 27 of file qpolygon.h.

◆ QPolygon() [3/5]

Q_IMPLICIT QPolygon::QPolygon ( QList< QPoint > && v)
inlinenoexcept

Definition at line 28 of file qpolygon.h.

◆ QPolygon() [4/5]

QPolygon::QPolygon ( const QRect & rectangle,
bool closed = false )

Constructs a polygon from the given rectangle.

If closed is false, the polygon just contains the four points of the rectangle ordered clockwise, otherwise the polygon's fifth point is set to {rectangle}.topLeft().

Note that the bottom-right corner of the rectangle is located at (rectangle.x() + rectangle.width(), rectangle.y() + rectangle.height()).

See also
setPoints()

Definition at line 123 of file qpolygon.cpp.

References QList< QPoint >::reserve().

+ Here is the call graph for this function:

◆ QPolygon() [5/5]

QPolygon::QPolygon ( int nPoints,
const int * points )

Constructs a point array with nPoints points, taken from the points array.

Equivalent to setPoints(nPoints, points).

Definition at line 142 of file qpolygon.cpp.

References setPoints().

+ Here is the call graph for this function:

Member Function Documentation

◆ boundingRect()

QRect QPolygon::boundingRect ( ) const

Returns the bounding rectangle of the polygon, or QRect(0, 0, 0, 0) if the polygon is empty.

See also
QList::isEmpty()

Definition at line 386 of file qpolygon.cpp.

References QList< QPoint >::constData(), QList< QPoint >::size(), QPoint::x(), and QPoint::y().

+ Here is the call graph for this function:

◆ containsPoint()

bool QPolygon::containsPoint ( const QPoint & point,
Qt::FillRule fillRule ) const
Since
4.3

Returns true if the given point is inside the polygon according to the specified fillRule; otherwise returns false.

Definition at line 766 of file qpolygon.cpp.

References at, i, QList< QPoint >::isEmpty(), qt_polygon_isect_line(), QList< QPoint >::size(), and Qt::WindingFill.

+ Here is the call graph for this function:

◆ intersected()

QPolygon QPolygon::intersected ( const QPolygon & r) const
Since
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.

See also
intersects()

Definition at line 820 of file qpolygon.cpp.

References QPainterPath::addPolygon(), QPainterPath::intersected(), QPainterPath::toFillPolygon(), and QPolygonF::toPolygon().

+ Here is the call graph for this function:

◆ intersects()

bool QPolygon::intersects ( const QPolygon & p) const
Since
5.10

Returns true if the current polygon intersects at any point the given polygon p. Also returns true if the current polygon contains or is contained by any part of p.

Set operations on polygons will treat the polygons as areas. Non-closed polygons will be treated as implicitly closed.

See also
intersected()

Definition at line 858 of file qpolygon.cpp.

References QPainterPath::addPolygon(), and QPainterPath::intersects().

+ Here is the call graph for this function:

◆ operator QVariant()

QPolygon::operator QVariant ( ) const

Returns the polygon as a QVariant.

Definition at line 642 of file qpolygon.cpp.

References QVariant::fromValue().

+ Here is the call graph for this function:

◆ point() [1/2]

QPoint QPolygon::point ( int i) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the point at the given index.

Definition at line 84 of file qpolygon.h.

References at.

◆ point() [2/2]

void QPolygon::point ( int index,
int * x,
int * y ) const

Extracts the coordinates of the point at the given index to {x} and *{y} (if they are valid pointers).

See also
setPoint()

Definition at line 206 of file qpolygon.cpp.

References at.

◆ putPoints() [1/3]

void QPolygon::putPoints ( int index,
int nPoints,
const int * points )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Copies nPoints points from the points coord array into this point array, and resizes the point array if {index+nPoints} exceeds the size of the array.

See also
setPoint()

Definition at line 303 of file qpolygon.cpp.

References i, QList< QPoint >::resize(), setPoint(), and QList< QPoint >::size().

Referenced by polygon::wrapper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ putPoints() [2/3]

void QPolygon::putPoints ( int index,
int nPoints,
const QPolygon & fromPolygon,
int fromIndex = 0 )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Copies nPoints points from the given fromIndex ( 0 by default) in fromPolygon into this polygon, starting at the specified index.

For example:

QPolygon polygon1;
polygon1.putPoints(0, 3, 1,2, 0,0, 5,6);
// polygon1 is now the three-point polygon(1,2, 0,0, 5,6);
QPolygon polygon2;
polygon2.putPoints(0, 3, 4,4, 5,5, 6,6);
// polygon2 is now (4,4, 5,5, 6,6);
polygon1.putPoints(2, 3, polygon2);
// polygon1 is now the five-point polygon(1,2, 0,0, 4,4, 5,5, 6,6);

Definition at line 365 of file qpolygon.cpp.

References QList< QPoint >::resize(), setPoint(), and QList< QPoint >::size().

+ Here is the call graph for this function:

◆ putPoints() [3/3]

void QPolygon::putPoints ( int index,
int nPoints,
int firstx,
int firsty,
... )

Copies nPoints points from the variable argument list into this polygon from the given index.

The points are given as a sequence of integers, starting with firstx then firsty, and so on. The polygon is resized if {index+nPoints} exceeds its current size.

The example code creates a polygon with three points (4,5), (6,7) and (8,9), by expanding the polygon from 1 to 3 points:

polygon[0] = QPoint(4, 5);
polygon.putPoints(1, 2, 6,7, 8,9);

The following code has the same result, but here the putPoints() function overwrites rather than extends:

polygon.putPoints(0, 3, 4,5, 0,0, 8,9);
polygon.putPoints(1, 1, 6,7);
See also
setPoints()

Definition at line 335 of file qpolygon.cpp.

References i, QList< QPoint >::resize(), setPoint(), and QList< QPoint >::size().

+ Here is the call graph for this function:

◆ setPoint() [1/2]

void QPolygon::setPoint ( int index,
const QPoint & p )
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the point at the given index to the given point.

Definition at line 81 of file qpolygon.h.

References setPoint(), QPoint::x(), and QPoint::y().

+ Here is the call graph for this function:

◆ setPoint() [2/2]

void QPolygon::setPoint ( int index,
int x,
int y )

Sets the point at the given index to the point specified by ({x}, {y}).

See also
point(), putPoints(), setPoints(),

Definition at line 235 of file qpolygon.cpp.

Referenced by putPoints(), putPoints(), putPoints(), setPoint(), setPoints(), and setPoints().

+ Here is the caller graph for this function:

◆ setPoints() [1/2]

void QPolygon::setPoints ( int nPoints,
const int * points )

Resizes the polygon to nPoints and populates it with the given points.

The example code creates a polygon with two points (10, 20) and (30, 40):

static const int points[] = { 10, 20, 30, 40 };
polygon.setPoints(2, points);
See also
setPoint(), putPoints()

Definition at line 253 of file qpolygon.cpp.

References i, QList< QPoint >::resize(), and setPoint().

Referenced by QPolygon(), QQC2::QWindowsStyle::drawComplexControl(), QQC2::QCommonStyle::drawPrimitive(), QQC2::QWindowsStyle::drawPrimitive(), qDrawShadeLine(), and QQC2::qDrawShadeLine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPoints() [2/2]

void QPolygon::setPoints ( int nPoints,
int firstx,
int firsty,
... )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Resizes the polygon to nPoints and populates it with the points specified by the variable argument list.

The points are given as a sequence of integers, starting with firstx then firsty, and so on.

The example code creates a polygon with two points (10, 20) and (30, 40):

polygon.setPoints(2, 10, 20, 30, 40);

Definition at line 277 of file qpolygon.cpp.

References i, QList< QPoint >::resize(), and setPoint().

+ Here is the call graph for this function:

◆ subtracted()

QPolygon QPolygon::subtracted ( const QPolygon & r) const
Since
4.3

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.

Definition at line 838 of file qpolygon.cpp.

References QPainterPath::addPolygon(), QPainterPath::subtracted(), QPainterPath::toFillPolygon(), and QPolygonF::toPolygon().

+ Here is the call graph for this function:

◆ swap()

void QPolygon::swap ( QPolygon & other)
inlinenoexcept
Since
4.8

Swaps polygon other with this polygon. This operation is very fast and never fails.

Definition at line 31 of file qpolygon.h.

References other(), and QList< T >::swap().

+ Here is the call graph for this function:

◆ toPolygonF()

QPolygonF QPolygon::toPolygonF ( ) const
inline
Since
6.4

Returns this polygon as a polygon with floating point accuracy.

See also
QPolygonF::toPolygon()

Definition at line 130 of file qpolygon.h.

◆ translate() [1/2]

void QPolygon::translate ( const QPoint & offset)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Translates all points in the polygon by the given offset.

See also
translated()

Definition at line 87 of file qpolygon.h.

References translate().

+ Here is the call graph for this function:

◆ translate() [2/2]

void QPolygon::translate ( int dx,
int dy )

Translates all points in the polygon by ({dx}, {dy}).

See also
translated()

Definition at line 153 of file qpolygon.cpp.

References QList< QPoint >::data(), i, and QList< QPoint >::size().

Referenced by translate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ translated() [1/2]

QPolygon QPolygon::translated ( const QPoint & offset) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Since
4.6

Returns a copy of the polygon that is translated by the given offset.

See also
translate()

Definition at line 90 of file qpolygon.h.

References translated().

+ Here is the call graph for this function:

◆ translated() [2/2]

QPolygon QPolygon::translated ( int dx,
int dy ) const

Returns a copy of the polygon that is translated by ({dx}, {dy}).

Since
4.6
See also
translate()

Definition at line 182 of file qpolygon.cpp.

References copy().

Referenced by translated().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ united()

QPolygon QPolygon::united ( const QPolygon & r) const
Since
4.3

Returns a polygon which is the union of this polygon and r.

Set operations on polygons, will treat the polygons as areas, and implicitly close the polygon.

See also
intersected(), subtracted()

Definition at line 801 of file qpolygon.cpp.

References QPainterPath::addPolygon(), QPainterPath::toFillPolygon(), QPolygonF::toPolygon(), and QPainterPath::united().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator<<()

QDataStream & operator<< ( QDataStream & stream,
const QPolygon & polygon )
related
Since
4.4

Writes the given polygon to the given stream, and returns a reference to the stream.

See also
{Serializing Qt Data Types}

Definition at line 661 of file qpolygon.cpp.

◆ operator>>()

QDataStream & operator>> ( QDataStream & stream,
QPolygon & polygon )
related
Since
4.4

Reads a polygon from the given stream into the given polygon, and returns a reference to the stream.

See also
{Serializing Qt Data Types}

Definition at line 677 of file qpolygon.cpp.


The documentation for this class was generated from the following files: