Skip to content
Permalink
Browse files

use float precision

  • Loading branch information
3nids committed Oct 19, 2018
1 parent 09d2260 commit b4e87d873e5f4a2cc403f0ef75c493e739ef5af2
Showing with 7 additions and 7 deletions.
  1. +2 −2 python/core/auto_generated/qgsmapsettings.sip.in
  2. +2 −2 src/core/qgsmapsettings.cpp
  3. +3 −3 src/core/qgsmapsettings.h
@@ -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;

0 comments on commit b4e87d8

Please sign in to comment.
You can’t perform that action at this time.