mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-28 00:04:04 -04:00
Set extent buffer in configureMapSettings
This commit is contained in:
parent
ebb2983ee3
commit
c4b1431e92
@ -751,18 +751,13 @@ namespace QgsWms
|
||||
QgsMapSettings mapSettings;
|
||||
configureLayers( layers, &mapSettings );
|
||||
|
||||
const QSize mapSize = mContext.mapSize();
|
||||
|
||||
// create the output image and the painter
|
||||
std::unique_ptr<QPainter> painter;
|
||||
std::unique_ptr<QImage> image( createImage( mapSize ) );
|
||||
std::unique_ptr<QImage> image( createImage( mContext.mapSize() ) );
|
||||
|
||||
// configure map settings (background, DPI, ...)
|
||||
configureMapSettings( image.get(), mapSettings );
|
||||
|
||||
// set the extent buffer in the map settings
|
||||
mapSettings.setExtentBuffer( mContext.mapTileBuffer( mapSize.width() ) );
|
||||
|
||||
// add layers to map settings
|
||||
mapSettings.setLayers( layers );
|
||||
|
||||
@ -1033,6 +1028,9 @@ namespace QgsWms
|
||||
|
||||
mapSettings.setExtent( mapExtent );
|
||||
|
||||
// set the extent buffer
|
||||
mapSettings.setExtentBuffer( mContext.mapTileBuffer( paintDevice->width() ) );
|
||||
|
||||
/* Define the background color
|
||||
* Transparent or colored
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user