- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# QPolygon Class Reference

Search for all occurrences

## Detailed Description

Definition at line 60 of file qpolygon.h.

`#include <qpolygon.h>`

Inheritance diagram for QPolygon:
[legend]

List of all members.

## Public Member Functions
| QPolygon ()
| ~QPolygon ()
| QPolygon (int size)
| QPolygon (const QPolygon &a)
| QPolygon (const QVector< QPoint > &v)
| QPolygon (const QRect &r, bool closed=false)
| QPolygon (int nPoints, const int *points)
| operator QVariant () const
void | translate (int dx, int dy)
void | translate (const QPoint &offset)
QPolygon | translated (int dx, int dy) const
QPolygon | translated (const QPoint &offset) const
QRect | boundingRect () const
void | point (int i, int *x, int *y) const
QPoint | point (int i) const
void | setPoint (int index, int x, int y)
void | setPoint (int index, const QPoint &p)
void | setPoints (int nPoints, const int *points)
void | setPoints (int nPoints, int firstx, int firsty,...)
void | putPoints (int index, int nPoints, const int *points)
void | putPoints (int index, int nPoints, int firstx, int firsty,...)
void | putPoints (int index, int nPoints, const QPolygon &from, int fromIndex=0)
bool | containsPoint (const QPoint &pt, Qt::FillRule fillRule) const
QPolygon | united (const QPolygon &r) const
QPolygon | intersected (const QPolygon &r) const
QPolygon | subtracted (const QPolygon &r) const

## Constructor & Destructor Documentation

QPolygon | ( |  | ) | `[inline]`

Definition at line 63 of file qpolygon.h.

    {}

~QPolygon | ( |  | ) | `[inline]`

Definition at line 64 of file qpolygon.h.

    {}

QPolygon | ( | int | size | ) | `[inline]`

Definition at line 97 of file qpolygon.h.

    : QVector<QPoint>(asize) {}

QPolygon | ( | const QPolygon & | a | ) | `[inline]`

Definition at line 66 of file qpolygon.h.

    : QVector<QPoint>(a) {}

QPolygon | ( | const QVector< QPoint > & | v | ) | `[inline]`

Definition at line 67 of file qpolygon.h.

    : QVector<QPoint>(v) {}

QPolygon | ( | const QRect & | r,
|  | bool | closed = `false`
| ) |  |

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

## Member Function Documentation

operator QVariant | ( |  | ) | const

void translate | ( | int | dx,
|  | int | dy
| ) |  |

Search for all occurrences

void translate | ( | const QPoint & | offset | ) | `[inline]`

Search for all occurrences

Definition at line 124 of file qpolygon.h.

    { translate(offset.x(), offset.y()); }

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

Search for all occurrences

QPolygon translated | ( | const QPoint & | offset | ) | const `[inline]`

Search for all occurrences

Definition at line 127 of file qpolygon.h.

    { return translated(offset.x(), offset.y()); }

QRect boundingRect | ( |  | ) | const

Search for all occurrences

void point | ( | int | i,
|  | int * | x,
|  | int * | y
| ) |  | const

Search for all occurrences

QPoint point | ( | int | i | ) | const `[inline]`

Search for all occurrences

Definition at line 121 of file qpolygon.h.

    { return at(index); }

void setPoint | ( | int | index,
|  | int | x,
|  | int | y
| ) |  | `[inline]`

Search for all occurrences

Definition at line 118 of file qpolygon.h.

    { (*this)[index] = QPoint(x, y); }

void setPoint | ( | int | index,
|  | const QPoint & | p
| ) |  | `[inline]`

Search for all occurrences

Definition at line 115 of file qpolygon.h.

    { (*this)[index] = pt; }

void setPoints | ( | int | nPoints,
|  | const int * | points
| ) |  |

Search for all occurrences

void setPoints | ( | int | nPoints,
|  | int | firstx,
|  | int | firsty,
|  |  | ...
| ) |  |

Search for all occurrences

void putPoints | ( | int | index,
|  | int | nPoints,
|  | const int * | points
| ) |  |

Search for all occurrences

void putPoints | ( | int | index,
|  | int | nPoints,
|  | int | firstx,
|  | int | firsty,
|  |  | ...
| ) |  |

Search for all occurrences

void putPoints | ( | int | index,
|  | int | nPoints,
|  | const QPolygon & | from,
|  | int | fromIndex = `0`
| ) |  |

Search for all occurrences

bool containsPoint | ( | const QPoint & | pt,
|  | Qt::FillRule | fillRule
| ) |  | const

Search for all occurrences

QPolygon united | ( | const QPolygon & | r | ) | const

Search for all occurrences

QPolygon intersected | ( | const QPolygon & | r | ) | const

Search for all occurrences

QPolygon subtracted | ( | const QPolygon & | r | ) | const

Search for all occurrences

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

- QtGui/qpolygon.h

QPolygon QPolygon QPolygon QPolygon QPolygon QPolygon QPolygon QPolygon QPolygon QPolygon
QPolygon QPolygon QPolygon QPolygon QPolygon QPolygon QPolygon QPolygon QPolygon QPolygon