Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.3
-
None
-
Desktop
-
2cf2f99ab1428b73d0531a4c6720a282bfef9fb0 (qt/qtbase/dev)
Description
fillRect produce light blue/green line artifacts when rendering to 16bpp image with scale + antialias hints enabled
Test case:
*********************************
#include <QApplication>
#include <QPainter>
#include <QWidget>
class myapp : public QWidget
{
Q_OBJECT
public:
myapp(QWidget *parent = 0)
: QWidget(parent) {}
protected:
void paintEvent(QPaintEvent *event)
{
Q_UNUSED(event);
QPainter painter(this);
painter.fillRect(rect(), Qt::white);
QImage image(rect().width(), rect().height(), QImage::Format_RGB16);
QPainter mypainter(&image);
mypainter.setRenderHint(QPainter::Antialiasing, true);
mypainter.scale(0.873118, 0.873118);
mypainter.fillRect(rect(), Qt::white);
for (int i = 0; i < rect().height(); i+=6)
painter.drawImage(QPoint(0, 0), image);
}
};
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
myapp mapp;
mapp.show();
return app.exec();
}
*********************************