We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 7c9442a commit d0943b8Copy full SHA for d0943b8
src/gui/qgsmapcanvasmap.cpp
@@ -42,14 +42,22 @@ void QgsMapCanvasMap::resize(QSize size)
42
43
void QgsMapCanvasMap::render()
44
{
45
- mPixmap.fill(mBgColor);
+ // use temporary image for rendering
46
+ QImage image(size(), QImage::Format_RGB32);
47
- QPainter paint(&mPixmap);
48
+ image.fill(mBgColor.rgb());
49
+
50
+ QPainter paint;
51
+ paint.begin(&image);
52
53
// antialiasing
54
if (mAntiAliasing)
55
paint.setRenderHint(QPainter::Antialiasing);
56
57
mRender->render(&paint);
58
59
+ paint.end();
60
61
+ // convert QImage to QPixmap to acheive faster drawing on screen
62
+ mPixmap = QPixmap::fromImage(image);
63
}
0 commit comments