@@ -187,7 +187,7 @@ namespace QgsWms
187
187
if ( !mWmsParameters .bbox ().isEmpty () )
188
188
{
189
189
QgsMapSettings mapSettings;
190
- image.reset ( createImage ( mWmsParameters .widthAsInt (), mWmsParameters .heightAsInt (), false ) );
190
+ image.reset ( createImage ( mWmsParameters .getWidthAsInt (), mWmsParameters .getHeightAsInt (), false ) );
191
191
configureMapSettings ( image.get (), mapSettings );
192
192
legendSettings.setMapScale ( mapSettings.scale () );
193
193
legendSettings.setMapUnitsPerPixel ( mapSettings.mapUnitsPerPixel () );
@@ -1045,8 +1045,8 @@ namespace QgsWms
1045
1045
}
1046
1046
1047
1047
// create the mapSettings and the output image
1048
- int imageWidth = mWmsParameters .widthAsInt ();
1049
- int imageHeight = mWmsParameters .heightAsInt ();
1048
+ int imageWidth = mWmsParameters .getWidthAsInt ();
1049
+ int imageHeight = mWmsParameters .getHeightAsInt ();
1050
1050
1051
1051
// Provide default image width/height values if format is not image
1052
1052
if ( !( imageWidth && imageHeight ) && ! mWmsParameters .infoFormatIsImage () )
@@ -1123,10 +1123,10 @@ namespace QgsWms
1123
1123
QImage *QgsRenderer::createImage ( int width, int height, bool useBbox ) const
1124
1124
{
1125
1125
if ( width < 0 )
1126
- width = mWmsParameters .widthAsInt ();
1126
+ width = mWmsParameters .getWidthAsInt ();
1127
1127
1128
1128
if ( height < 0 )
1129
- height = mWmsParameters .heightAsInt ();
1129
+ height = mWmsParameters .getHeightAsInt ();
1130
1130
1131
1131
// Adapt width / height if the aspect ratio does not correspond with the BBOX.
1132
1132
// Required by WMS spec. 1.3.
@@ -1315,8 +1315,8 @@ namespace QgsWms
1315
1315
i = mWmsParameters .xAsInt ();
1316
1316
j = mWmsParameters .yAsInt ();
1317
1317
}
1318
- int width = mWmsParameters .widthAsInt ();
1319
- int height = mWmsParameters .heightAsInt ();
1318
+ int width = mWmsParameters .getWidthAsInt ();
1319
+ int height = mWmsParameters .getHeightAsInt ();
1320
1320
if ( ( i != -1 && j != -1 && width != 0 && height != 0 ) && ( width != outputImage->width () || height != outputImage->height () ) )
1321
1321
{
1322
1322
i *= ( outputImage->width () / static_cast <double >( width ) );
@@ -1994,14 +1994,14 @@ namespace QgsWms
1994
1994
{
1995
1995
// test if maxWidth / maxHeight set and WIDTH / HEIGHT parameter is in the range
1996
1996
int wmsMaxWidth = QgsServerProjectUtils::wmsMaxWidth ( *mProject );
1997
- int width = mWmsParameters .widthAsInt ();
1997
+ int width = mWmsParameters .getWidthAsInt ();
1998
1998
if ( wmsMaxWidth != -1 && width > wmsMaxWidth )
1999
1999
{
2000
2000
return false ;
2001
2001
}
2002
2002
2003
2003
int wmsMaxHeight = QgsServerProjectUtils::wmsMaxHeight ( *mProject );
2004
- int height = mWmsParameters .heightAsInt ();
2004
+ int height = mWmsParameters .getHeightAsInt ();
2005
2005
if ( wmsMaxHeight != -1 && height > wmsMaxHeight )
2006
2006
{
2007
2007
return false ;
@@ -3206,8 +3206,8 @@ namespace QgsWms
3206
3206
// WIDTH / HEIGHT parameters. If not, the image has to be scaled (required
3207
3207
// by WMS spec)
3208
3208
QImage *scaledImage = nullptr ;
3209
- int width = mWmsParameters .widthAsInt ();
3210
- int height = mWmsParameters .heightAsInt ();
3209
+ int width = mWmsParameters .getWidthAsInt ();
3210
+ int height = mWmsParameters .getHeightAsInt ();
3211
3211
if ( width != image->width () || height != image->height () )
3212
3212
{
3213
3213
scaledImage = new QImage ( image->scaled ( width, height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation ) );
0 commit comments