File tree 6 files changed +10
-11
lines changed
6 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ class QgsMapRenderer : QObject
184
184
//! sets whether map image will be for overview
185
185
void enableOverviewMode( bool isOverview = true );
186
186
187
- void setOutputSize( QSize size, int dpi );
187
+ void setOutputSize( QSize size, double dpi );
188
188
void setOutputSize( QSizeF size, double dpi );
189
189
190
190
//!accessor for output dpi
Original file line number Diff line number Diff line change @@ -35,9 +35,9 @@ class QgsMapSettings
35
35
36
36
//! Return DPI used for conversion between real world units (e.g. mm) and pixels
37
37
//! Default value is 96
38
- int outputDpi() const;
38
+ double outputDpi() const;
39
39
//! Set DPI used for conversion between real world units (e.g. mm) and pixels
40
- void setOutputDpi( int dpi );
40
+ void setOutputDpi( double dpi );
41
41
42
42
43
43
/**
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ double QgsMapRenderer::rotation() const
138
138
}
139
139
140
140
141
- void QgsMapRenderer::setOutputSize ( QSize size, int dpi )
141
+ void QgsMapRenderer::setOutputSize ( QSize size, double dpi )
142
142
{
143
143
mSize = QSizeF ( size.width (), size.height () );
144
144
mScaleCalculator ->setDpi ( dpi );
Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ class CORE_EXPORT QgsMapRenderer : public QObject
247
247
// ! sets whether map image will be for overview
248
248
void enableOverviewMode ( bool isOverview = true ) { mOverview = isOverview; }
249
249
250
- void setOutputSize ( QSize size, int dpi );
250
+ void setOutputSize ( QSize size, double dpi );
251
251
void setOutputSize ( QSizeF size, double dpi );
252
252
253
253
// !accessor for output dpi
Original file line number Diff line number Diff line change @@ -241,12 +241,12 @@ void QgsMapSettings::setOutputSize( QSize size )
241
241
updateDerived ();
242
242
}
243
243
244
- int QgsMapSettings::outputDpi () const
244
+ double QgsMapSettings::outputDpi () const
245
245
{
246
- return ( int ) mDpi ;
246
+ return mDpi ;
247
247
}
248
248
249
- void QgsMapSettings::setOutputDpi ( int dpi )
249
+ void QgsMapSettings::setOutputDpi ( double dpi )
250
250
{
251
251
mDpi = dpi;
252
252
Original file line number Diff line number Diff line change @@ -83,10 +83,9 @@ class CORE_EXPORT QgsMapSettings
83
83
84
84
// ! Return DPI used for conversion between real world units (e.g. mm) and pixels
85
85
// ! Default value is 96
86
- // ! TODO QGIS 3 return double ?
87
- int outputDpi () const ;
86
+ double outputDpi () const ;
88
87
// ! Set DPI used for conversion between real world units (e.g. mm) and pixels
89
- void setOutputDpi ( int dpi );
88
+ void setOutputDpi ( double dpi );
90
89
91
90
/* *
92
91
* @brief setMagnificationFactor set the magnification factor
You can’t perform that action at this time.
0 commit comments