diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/image/qpixmapfilter.cpp | 13 | ||||
-rw-r--r-- | src/gui/text/qtextdocumentlayout.cpp | 4 | ||||
-rw-r--r-- | src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp | 1 |
3 files changed, 12 insertions, 6 deletions
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp index d83ef2c..de8f4e0 100644 --- a/src/gui/image/qpixmapfilter.cpp +++ b/src/gui/image/qpixmapfilter.cpp @@ -1089,19 +1089,24 @@ void QPixmapDropShadowFilter::draw(QPainter *p, return; } - QImage tmp = src.isNull() ? px.toImage() : px.copy(src.toAlignedRect()).toImage(); + QImage tmp(px.size(), QImage::Format_ARGB32_Premultiplied); + tmp.fill(0); + QPainter tmpPainter(&tmp); + tmpPainter.setCompositionMode(QPainter::CompositionMode_Source); + tmpPainter.drawPixmap(d->offset, px); + tmpPainter.end(); // blur the alpha channel tmp = blurred(tmp, tmp.rect(), qRound(d->radius), true); // blacken the image... - QPainter tmpPainter(&tmp); + tmpPainter.begin(&tmp); tmpPainter.setCompositionMode(QPainter::CompositionMode_SourceIn); - tmpPainter.fillRect(0, 0, tmp.width(), tmp.height(), d->color); + tmpPainter.fillRect(tmp.rect(), d->color); tmpPainter.end(); // draw the blurred drop shadow... - p->drawImage(pos + d->offset, tmp); + p->drawImage(pos, tmp); // Draw the actual pixmap... p->drawPixmap(pos, px, src); diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index 73434b1..85265af 100644 --- a/src/gui/text/qtextdocumentlayout.cpp +++ b/src/gui/text/qtextdocumentlayout.cpp @@ -1448,13 +1448,13 @@ void QTextDocumentLayoutPrivate::drawListItem(const QPointF &offset, QPainter *p painter->fillRect(r, brush); break; case QTextListFormat::ListCircle: - painter->drawEllipse(r); + painter->setPen(QPen(brush)); + painter->drawEllipse(r.translated(0.5, 0.5)); // pixel align for sharper rendering break; case QTextListFormat::ListDisc: painter->setBrush(brush); painter->setPen(Qt::NoPen); painter->drawEllipse(r); - painter->setBrush(Qt::NoBrush); break; case QTextListFormat::ListStyleUndefined: break; diff --git a/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp b/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp index 8756ecb..fb6f5ea 100644 --- a/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp +++ b/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp @@ -82,6 +82,7 @@ QTraceWindowSurface::~QTraceWindowSurface() QFile outputFile(QString(QLatin1String("qtgraphics-%0.trace")).arg(winId)); if (outputFile.open(QIODevice::WriteOnly)) { QDataStream out(&outputFile); + out.writeBytes("qttrace", 7); out << *buffer << updates; } delete buffer; |