QtBase  v6.3.1
Classes | Macros | Enumerations | Functions
tst_qpainter.cpp File Reference
#include <QTest>
#include <qpainter.h>
#include <qdrawutil.h>
#include <qwidget.h>
#include <qguiapplication.h>
#include <qfontmetrics.h>
#include <qbitmap.h>
#include <qimage.h>
#include <qthread.h>
#include <limits.h>
#include <math.h>
#include <qpaintengine.h>
#include <qpixmap.h>
#include <qrandom.h>
#include <private/qdrawhelper_p.h>
#include <qpainterpath.h>
#include <qqueue.h>
#include <qscreen.h>
#include <qgraphicsview.h>
#include <qgraphicsscene.h>
#include <qgraphicsproxywidget.h>
#include <qfontdatabase.h>
#include <fenv.h>
#include "tst_qpainter.moc"
Include dependency graph for tst_qpainter.cpp:

Go to the source code of this file.

Classes

class  tst_QPainter
 
class  DummyPaintEngine
 
class  ViewportTestWidget
 
class  FpExceptionChecker
 
class  TestProxy
 
class  TestWidget
 [0] More...
 
class  GradientProducer
 
class  TextDrawerThread
 

Macros

#define FPE_TEST(x)
 
#define FOR_EACH_NEIGHBOR_8   for (int dx = -1; dx <= 1; ++dx) for (int dy = -1; dy <= 1; ++dy) if (dx != 0 || dy != 0)
 
#define FOR_EACH_NEIGHBOR_4   for (int dx = -1; dx <= 1; ++dx) for (int dy = -1; dy <= 1; ++dy) if ((dx == 0) != (dy == 0))
 

Enumerations

enum  CosmeticStrokerPaint { Antialiasing , Dashing }
 

Functions

QRgb qt_compose_alpha (QRgb source, QRgb dest)
 
int countPixels (const QImage &img, const QRgb &color)
 
template<typename T >
void testClipping (QImage &img)
 
void porterDuff_warningChecker (QtMsgType type, const QMessageLogContext &, const QString &msg)
 
void fpe_rasterizeLine_task232012 ()
 
void fpe_pixmapTransform ()
 
void fpe_zeroLengthLines ()
 
void fpe_divByZero ()
 
void fpe_steepSlopes ()
 
void fpe_radialGradients ()
 
qreal randf ()
 
QPointF randInRect (const QRectF &rect)
 
bool verifyOutlineFillConsistency (const QImage &img, QRgb outside, QRgb inside, QRgb outline)
 
bool verifyImage (const QImage &img, int x, int y, int w, int h, uint background)
 
int diffColor (quint32 ap, quint32 bp)
 
bool testCompositionMode (int src, int dst, int expected, QPainter::CompositionMode op, qreal opacity=1.0)
 

Macro Definition Documentation

◆ FOR_EACH_NEIGHBOR_4

#define FOR_EACH_NEIGHBOR_4   for (int dx = -1; dx <= 1; ++dx) for (int dy = -1; dy <= 1; ++dy) if ((dx == 0) != (dy == 0))

Definition at line 3259 of file tst_qpainter.cpp.

◆ FOR_EACH_NEIGHBOR_8

#define FOR_EACH_NEIGHBOR_8   for (int dx = -1; dx <= 1; ++dx) for (int dy = -1; dy <= 1; ++dy) if (dx != 0 || dy != 0)

Definition at line 3258 of file tst_qpainter.cpp.

◆ FPE_TEST

#define FPE_TEST (   x)
Value:
{ \
::x(); \
}
GLint GLint GLint GLint GLint x
[0]

Definition at line 3004 of file tst_qpainter.cpp.

Enumeration Type Documentation

◆ CosmeticStrokerPaint

Enumerator
Antialiasing 
Dashing 

Definition at line 5069 of file tst_qpainter.cpp.

Function Documentation

◆ countPixels()

int countPixels ( const QImage img,
const QRgb color 
)

Definition at line 1685 of file tst_qpainter.cpp.

Here is the caller graph for this function:

◆ diffColor()

int diffColor ( quint32  ap,
quint32  bp 
)

Definition at line 3654 of file tst_qpainter.cpp.

Here is the call graph for this function:

◆ fpe_divByZero()

void fpe_divByZero ( )

Definition at line 2946 of file tst_qpainter.cpp.

◆ fpe_pixmapTransform()

void fpe_pixmapTransform ( )

Definition at line 2906 of file tst_qpainter.cpp.

◆ fpe_radialGradients()

void fpe_radialGradients ( )

Definition at line 2988 of file tst_qpainter.cpp.

◆ fpe_rasterizeLine_task232012()

void fpe_rasterizeLine_task232012 ( )

Definition at line 2894 of file tst_qpainter.cpp.

◆ fpe_steepSlopes()

void fpe_steepSlopes ( )

Definition at line 2969 of file tst_qpainter.cpp.

◆ fpe_zeroLengthLines()

void fpe_zeroLengthLines ( )

Definition at line 2934 of file tst_qpainter.cpp.

◆ porterDuff_warningChecker()

void porterDuff_warningChecker ( QtMsgType  type,
const QMessageLogContext ,
const QString msg 
)

Definition at line 2654 of file tst_qpainter.cpp.

◆ qt_compose_alpha()

QRgb qt_compose_alpha ( QRgb  source,
QRgb  dest 
)

Definition at line 429 of file tst_qpainter.cpp.

◆ randf()

qreal randf ( )

Definition at line 3075 of file tst_qpainter.cpp.

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

◆ randInRect()

QPointF randInRect ( const QRectF rect)

Definition at line 3080 of file tst_qpainter.cpp.

Here is the call graph for this function:

◆ testClipping()

template<typename T >
void testClipping ( QImage img)

Definition at line 1697 of file tst_qpainter.cpp.

Here is the call graph for this function:

◆ testCompositionMode()

bool testCompositionMode ( int  src,
int  dst,
int  expected,
QPainter::CompositionMode  op,
qreal  opacity = 1.0 
)

Definition at line 4151 of file tst_qpainter.cpp.

Here is the call graph for this function:

◆ verifyImage()

bool verifyImage ( const QImage img,
int  x,
int  y,
int  w,
int  h,
uint  background 
)

Definition at line 3574 of file tst_qpainter.cpp.

◆ verifyOutlineFillConsistency()

bool verifyOutlineFillConsistency ( const QImage img,
QRgb  outside,
QRgb  inside,
QRgb  outline 
)

Definition at line 3261 of file tst_qpainter.cpp.

Here is the call graph for this function: