src/gui/painting/qregion.cpp File Reference

#include "qregion.h"
#include "qpolygon.h"
#include "qbuffer.h"
#include "qdatastream.h"
#include "qvariant.h"
#include <qdebug.h>

Include dependency graph for qregion.cpp:

Go to the source code of this file.

Defines

#define QRGN_SETRECT   1
#define QRGN_SETELLIPSE   2
#define QRGN_SETPTARRAY_ALT   3
#define QRGN_SETPTARRAY_WIND   4
#define QRGN_TRANSLATE   5
#define QRGN_OR   6
#define QRGN_AND   7
#define QRGN_SUB   8
#define QRGN_XOR   9
#define QRGN_RECTS   10

Functions

QDebug operator<< (QDebug s, const QRegion &r)
bool rect_intersects (const QRect &r1, const QRect &r2)


Define Documentation

#define QRGN_AND   7

Definition at line 215 of file qregion.cpp.

Referenced by QRegion::exec().

#define QRGN_OR   6

Definition at line 214 of file qregion.cpp.

Referenced by QRegion::exec().

#define QRGN_RECTS   10

Definition at line 218 of file qregion.cpp.

Referenced by QRegion::exec().

#define QRGN_SETELLIPSE   2

Definition at line 210 of file qregion.cpp.

Referenced by QRegion::exec().

#define QRGN_SETPTARRAY_ALT   3

Definition at line 211 of file qregion.cpp.

Referenced by QRegion::exec().

#define QRGN_SETPTARRAY_WIND   4

Definition at line 212 of file qregion.cpp.

Referenced by QRegion::exec().

#define QRGN_SETRECT   1

Definition at line 209 of file qregion.cpp.

Referenced by QRegion::exec().

#define QRGN_SUB   8

Definition at line 216 of file qregion.cpp.

Referenced by QRegion::exec().

#define QRGN_TRANSLATE   5

Definition at line 213 of file qregion.cpp.

Referenced by QRegion::exec().

#define QRGN_XOR   9

Definition at line 217 of file qregion.cpp.

Referenced by QRegion::exec().


Function Documentation

QDebug operator<< ( QDebug  s,
const QRegion r 
)

Definition at line 361 of file qregion.cpp.

00362 {
00363     QVector<QRect> rects = r.rects();
00364     s.nospace() << "QRegion(size=" << rects.size() << "), "
00365                 << "bounds = " << r.boundingRect() << "\n";
00366     for (int i=0; i<rects.size(); ++i)
00367         s << "- " << i << rects.at(i) << "\n";
00368     return s;
00369 }

bool rect_intersects ( const QRect r1,
const QRect r2 
) [inline]

Definition at line 529 of file qregion.cpp.

References QRect::bottom(), QRect::left(), qMax(), qMin(), QRect::right(), and QRect::top().

00530 {
00531     return qMax(r1.left(), r2.left()) <= qMin(r1.right(), r2.right())
00532         && qMax(r1.top(), r2.top()) <= qMin(r1.bottom(), r2.bottom());
00533 }

Here is the call graph for this function:


Generated on Thu Mar 15 13:36:52 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1