Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
None
-
4.8.7
-
None
Description
Example.
{ QPixmap Buffer(100, 100); QPainter painter; painter.begin(&Buffer); painter.setPen(QPen(Qt::red)); painter.setBrush(QBrush(Qt::yellow)); QPolygon poly; poly << QPoint(200,-100) << QPoint(200,200) << QPoint(-1,200) << QPoint(-1,-100) << QPoint(200,-100); painter.drawPolygon(poly); // or drawPolyline(poly) Buffer.save("c:/1.png", "PNG"); }The result pixmap must contain yellow rectangle without any outline.
But there is a DIAGONAL red line.
Note 1.
Using QPainterPath with the same data makes correct drawing.
QPainterPath path;
path.addPolygon(poly);
painter.drawPath(path);
Note 2.
Changing X coordinate -1 to any other number (-2, -1000, etc) makes correct drawing.