We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3a4ace commit 70a0a6eCopy full SHA for 70a0a6e
src/core/composer/qgscomposermap.cpp
@@ -270,14 +270,19 @@ void QgsComposerMap::cache( void )
270
int w = widthMM * horizontalVScaleFactor;
271
int h = heightMM * horizontalVScaleFactor;
272
273
- if ( w > 5000 ) //limit size of image for better performance
+ // limit size of image for better performance
274
+ if ( w > 5000 || h > 5000 )
275
{
- w = 5000;
276
- }
277
-
278
- if ( h > 5000 )
279
- {
280
- h = 5000;
+ if ( w > h )
+ {
+ w = 5000;
+ h = w * heightMM / widthMM;
+ }
281
+ else
282
283
+ h = 5000;
284
+ w = h * widthMM / heightMM;
285
286
}
287
288
mCacheImage = QImage( w, h, QImage::Format_ARGB32 );
0 commit comments