mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
use float precision
This commit is contained in:
parent
09d2260b86
commit
b4e87d873e
@ -60,14 +60,14 @@ Returns the size of the resulting map image
|
||||
Sets the size of the resulting map image
|
||||
%End
|
||||
|
||||
int devicePixelRatio() const;
|
||||
float devicePixelRatio() const;
|
||||
%Docstring
|
||||
Returns device pixel ratio
|
||||
|
||||
.. versionadded:: 3.4
|
||||
%End
|
||||
|
||||
void setDevicePixelRatio( int dpr );
|
||||
void setDevicePixelRatio( float dpr );
|
||||
%Docstring
|
||||
Sets the device pixel ratio
|
||||
|
||||
|
@ -230,12 +230,12 @@ void QgsMapSettings::setOutputSize( QSize size )
|
||||
updateDerived();
|
||||
}
|
||||
|
||||
int QgsMapSettings::devicePixelRatio() const
|
||||
float QgsMapSettings::devicePixelRatio() const
|
||||
{
|
||||
return mDevicePixelRatio;
|
||||
}
|
||||
|
||||
void QgsMapSettings::setDevicePixelRatio( int dpr )
|
||||
void QgsMapSettings::setDevicePixelRatio( float dpr )
|
||||
{
|
||||
mDevicePixelRatio = dpr;
|
||||
}
|
||||
|
@ -85,13 +85,13 @@ class CORE_EXPORT QgsMapSettings
|
||||
* Returns device pixel ratio
|
||||
* \since QGIS 3.4
|
||||
*/
|
||||
int devicePixelRatio() const;
|
||||
float devicePixelRatio() const;
|
||||
|
||||
/**
|
||||
* Sets the device pixel ratio
|
||||
* \since QGIS 3.4
|
||||
*/
|
||||
void setDevicePixelRatio( int dpr );
|
||||
void setDevicePixelRatio( float dpr );
|
||||
|
||||
/**
|
||||
* Returns the device output size of the map canvas
|
||||
@ -423,7 +423,7 @@ class CORE_EXPORT QgsMapSettings
|
||||
double mDpi;
|
||||
|
||||
QSize mSize;
|
||||
int mDevicePixelRatio = 1;
|
||||
float mDevicePixelRatio = 1.0;
|
||||
|
||||
QgsRectangle mExtent;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user