Skip to content

Commit

Permalink
more dox
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Oct 19, 2018
1 parent c1ce03c commit ff1face
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions python/core/auto_generated/qgsmapsettings.sip.in
Expand Up @@ -21,10 +21,12 @@ The rendering itself is done by QgsMapRendererJob subclasses.
In order to set up QgsMapSettings instance, it is necessary to set at least
few members: extent, output size and layers.

QgsMapSettings and QgsMapRendererJob (+subclasses) are intended to replace
QgsMapRenderer class that existed before QGIS 2.4. The advantage of the new
classes is that they separate the settings from the rendering and provide
asynchronous API for map rendering.
Some systems use high DPI scaling that is an alternative to the traditional
DPI scaling. The operating system provides Qt with a scaling ratio and it
scales window, event, and desktop geometry. The Cocoa platform plugin sets
the scaling ratio as QWindow.devicePixelRatio().
To properly render the map on such systems, the map settings device pixel
ratio shall be set accordingly.

.. versionadded:: 2.4
%End
Expand Down Expand Up @@ -63,13 +65,15 @@ Sets the size of the resulting map image
float devicePixelRatio() const;
%Docstring
Returns device pixel ratio
Common values are 1 for normal-dpi displays and 2 for high-dpi "retina" displays.

.. versionadded:: 3.4
%End

void setDevicePixelRatio( float dpr );
%Docstring
Sets the device pixel ratio
Common values are 1 for normal-dpi displays and 2 for high-dpi "retina" displays.

.. versionadded:: 3.4
%End
Expand Down
12 changes: 8 additions & 4 deletions src/core/qgsmapsettings.h
Expand Up @@ -48,10 +48,12 @@ class QgsMapRendererJob;
* In order to set up QgsMapSettings instance, it is necessary to set at least
* few members: extent, output size and layers.
*
* QgsMapSettings and QgsMapRendererJob (+subclasses) are intended to replace
* QgsMapRenderer class that existed before QGIS 2.4. The advantage of the new
* classes is that they separate the settings from the rendering and provide
* asynchronous API for map rendering.
* Some systems use high DPI scaling that is an alternative to the traditional
* DPI scaling. The operating system provides Qt with a scaling ratio and it
* scales window, event, and desktop geometry. The Cocoa platform plugin sets
* the scaling ratio as QWindow::devicePixelRatio().
* To properly render the map on such systems, the map settings device pixel
* ratio shall be set accordingly.
*
* \since QGIS 2.4
*/
Expand Down Expand Up @@ -83,12 +85,14 @@ class CORE_EXPORT QgsMapSettings

/**
* Returns device pixel ratio
* Common values are 1 for normal-dpi displays and 2 for high-dpi "retina" displays.
* \since QGIS 3.4
*/
float devicePixelRatio() const;

/**
* Sets the device pixel ratio
* Common values are 1 for normal-dpi displays and 2 for high-dpi "retina" displays.
* \since QGIS 3.4
*/
void setDevicePixelRatio( float dpr );
Expand Down

0 comments on commit ff1face

Please sign in to comment.