dpi_, dpi_, 0, 0, width(), height()));
QMatrix matrix (dpi_ / 72.0, 0, 0, dpi_ / 72.0, 0, 0);
+ QPainter painter;
+ painter.begin(&image);
+ painter.setCompositionMode(QPainter::CompositionMode_Darken);
BOOST_FOREACH(QRectF const & highlightArea, highlightAreas_) {
QRect highlightRect = matrix.mapRect(highlightArea).toRect();
- highlightRect.adjust(-2, -2, 2, 2);
- QImage highlight = image.copy(highlightRect);
- QPainter painter;
- painter.begin(&image);
- painter.fillRect(image.rect(), QColor(0, 0, 0, 32));
- painter.drawImage(highlightRect, highlight);
- painter.end();
+ highlightRect.adjust(-2, -2, 2, 1);
+ painter.fillRect(highlightRect, QColor(244, 229, 0));
}
+ painter.end();
setPixmap(QPixmap::fromImage(image));
}