Hi there,
I'm using QGLFrameBufferObject as a QPainterDevice like that ;
m_pen(QBrush(QColor(255,0,0,80)),10)
To copy to clipboard, switch view to plain text mode
// QGLFramebufferObjectFormat format;
// format.setAttachment(QGLFramebufferObject::CombinedDepthStencil);
// format.setSamples(3);
// QGLFramebufferObjectFormat format;
// format.setAttachment(QGLFramebufferObject::CombinedDepthStencil);
// format.setSamples(3);
m_FBO = new QGLFramebufferObject(width(),height()/*, format*/);
To copy to clipboard, switch view to plain text mode
painter.
setRenderHints(QPainter::HighQualityAntialiasing |
QPainter::SmoothPixmapTransform |
QPainter::TextAntialiasing);
painter.setPen(m_pen);
painter.drawLine(m_start,m_end);
QPainter painter(m_FBO);
painter.setRenderHints(QPainter::HighQualityAntialiasing | QPainter::SmoothPixmapTransform | QPainter::TextAntialiasing);
painter.setPen(m_pen);
painter.drawLine(m_start,m_end);
To copy to clipboard, switch view to plain text mode
If i use opaque colors everything is going well. and if i don't use opaque colors in m_pen like that m_pen(QBrush(QColor(255,0,0,80)),10) transparent colors drawing so weird as like attached image;
weirdo.png
is there any idea what is going wrong ? Thanks ...
Bookmarks