Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.2.0
-
None
Description
If I draw something that uses a QPen to a QPainter created with QOpenGLPaintDevice then I get incorrect results if the alpha component of the pen's color is other than 255.
Here's an example:
QOpenGLPaintDevice device(size);
QPainter painter(&device);
painter.setPen(QPen(QColor(255, 0, 0, 255), 5));
painter.setBrush(Qt::NoBrush);
painter.drawEllipse(QRect(size.width() / 2 - 100, size.height() / 2 - 100, 200, 200));
With that code, I get the following results (this is on top of a map that is already rendered using other methods)...
http://m2.i.pbase.com/o9/09/605909/1/154046342.nGGAoY9D.Screenshot_01.png
If I change the alpha value of the pen color to 128 then here's what I get...
http://m4.i.pbase.com/o9/09/605909/1/154046344.QoJtHhK0.Screenshot_02.png
Attachments
Issue Links
- duplicates
-
QTBUG-96786 QPainter::drawRect fills OpenGL window background when pen's alpha != 1.0
- Closed