52 void paintingActive();
57 void boundaryValues_data();
58 void boundaryValues();
65 void tst_QPicture::devType()
71 void tst_QPicture::paintingActive()
83 void tst_QPicture::boundingRect()
90 p1.setBoundingRect( r1 );
95 pt.drawLine( 10, 20, 110, 80 );
110 p.drawLine(0, 0, 5, 0);
111 p.drawLine(0, 0, 0, 5);
114 QRect r3(0, 0, 5, 5);
119 void tst_QPicture::swap()
157 bool end()
override {
return true; }
174 void tst_QPicture::serialization()
177 const int thisVersion =
stream.version();
230 p->drawRect(scaleRect(
QRectF(100, 100, 100, 100), xf, yf));
232 p->translate(10 * xf, 10 * yf);
234 p->drawRect(scaleRect(
QRectF(100, 100, 100, 100), xf, yf));
242 void tst_QPicture::save_restore()
253 p.drawPicture(50, 50, pic);
263 QVERIFY( pix1.toImage() == pix2.toImage() );
266 void tst_QPicture::boundaryValues_data()
268 QTest::addColumn<int>(
"x");
269 QTest::addColumn<int>(
"y");
282 void tst_QPicture::boundaryValues()
297 #include "tst_qpicture.moc"
void updateState(const QPaintEngineState &) override
bool begin(QPaintDevice *) override
void drawPixmap(const QRectF &, const QPixmap &, const QRectF &) override
Type type() const override
QPaintEngine * paintEngine() const override
The QBuffer class provides a QIODevice interface for a QByteArray.
The QDataStream class provides serialization of binary data to a QIODevice.
The QFont class specifies a query for a font used for drawing text.
QString styleName() const
HintingPreference hintingPreference() const
void setHintingPreference(HintingPreference hintingPreference)
void setStyleName(const QString &)
QScreen * primaryScreen
the primary (or default) screen of the application.
The QObject class is the base class of all Qt objects.
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
QPaintEngineState * state
The QPaintEngineState class provides information about the active paint engine's current state....
The QPainter class performs low-level painting on widgets and other paint devices.
void drawPoint(const QPointF &pt)
void drawLine(const QLineF &line)
bool begin(QPaintDevice *)
void setFont(const QFont &f)
void drawText(const QPointF &p, const QString &s)
The QPicture class is a paint device that records and replays QPainter commands.
const char * data() const
QRect boundingRect() const
The QPixmap class is an off-screen image representation that can be used as a paint device.
void swap(QPixmap &other) noexcept
The QPoint class defines a point in the plane using integer precision.
The QRectF class defines a finite rectangle in the plane using floating point precision.
The QRect class defines a rectangle in the plane using integer precision.
The QScreen class is used to query screen properties. \inmodule QtGui.
qreal logicalDotsPerInchY
the number of logical dots or pixels per inch in the vertical direction
qreal logicalDotsPerInchX
the number of logical dots or pixels per inch in the horizontal direction
static QString fromLatin1(QByteArrayView ba)
auto it unsigned count const
Q_TESTLIB_EXPORT QTestData & newRow(const char *dataTag)
QT_END_INCLUDE_NAMESPACE typedef double qreal
GLint GLint GLint GLint GLint x
[0]
#define QStringLiteral(str)
#define QTEST_MAIN(TestObject)
#define QFETCH(Type, name)
#define QVERIFY(statement)
#define QVERIFY2(statement, description)
void ensureSerializesCorrectly(const QPicture &picture, QDataStream::Version version)