Skip to content

Commit

Permalink
fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik authored and wonder-sk committed Jan 14, 2021
1 parent d883d41 commit 9bff34e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions python/core/auto_generated/qgsmaplayerrenderer.sip.in
Expand Up @@ -98,8 +98,8 @@ Returns the render context associated with the renderer.

bool isReadyToCompose() const;
%Docstring
Returns whether the renderer already drawn (at
least partially) some data to resulting image
Returns whether the renderer has already drawn (at
least partially) some data

.. versionadded:: 3.18
%End
Expand Down
9 changes: 5 additions & 4 deletions python/core/auto_generated/qgsmaprenderercache.sip.in
Expand Up @@ -22,8 +22,8 @@ If triggered, the cache removes the rendered image (and disconnects from the
layers).

When user pans/zooms the canvas, the cache is also used in rendering period
for particular layer after first render update and moment layer actually
partially rendered something in the resulting image
for particular layers between the first render update and the moment the layer
actually has partially rendered something in the resulting image.

The class is thread-safe (multiple classes can access the same instance safely).

Expand All @@ -49,9 +49,10 @@ Invalidates the cache contents, clearing all cached images.
Initialize cache: sets extent and scale parameters and clears the cache if any
parameters have changed since last initialization.

Deprecated, use :py:func:`~QgsMapRendererCache.updateParameters` and :py:func:`~QgsMapRendererCache.clear`

:return: flag whether the parameters are the same as last time

.. deprecated:: QGIS 3.18
- will be removed in QGIS 4.0. Use the updateParameters() and clear()
%End

bool updateParameters( const QgsRectangle &extent, const QgsMapToPixel &mtp );
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsmaplayerrenderer.h
Expand Up @@ -111,8 +111,8 @@ class CORE_EXPORT QgsMapLayerRenderer
const QgsRenderContext *renderContext() const SIP_SKIP { return mContext; }

/**
* Returns whether the renderer already drawn (at
* least partially) some data to resulting image
* Returns whether the renderer has already drawn (at
* least partially) some data
*
* \since QGIS 3.18
*/
Expand Down
7 changes: 3 additions & 4 deletions src/core/qgsmaprenderercache.h
Expand Up @@ -36,8 +36,8 @@
* layers).
*
* When user pans/zooms the canvas, the cache is also used in rendering period
* for particular layer after first render update and moment layer actually
* partially rendered something in the resulting image
* for particular layers between the first render update and the moment the layer
* actually has partially rendered something in the resulting image.
*
* The class is thread-safe (multiple classes can access the same instance safely).
*
Expand All @@ -60,9 +60,8 @@ class CORE_EXPORT QgsMapRendererCache : public QObject
* Initialize cache: sets extent and scale parameters and clears the cache if any
* parameters have changed since last initialization.
*
* Deprecated, use updateParameters() and clear()
*
* \returns flag whether the parameters are the same as last time
* \deprecated since QGIS 3.18 - will be removed in QGIS 4.0. Use the updateParameters() and clear()
*/
bool Q_DECL_DEPRECATED init( const QgsRectangle &extent, double scale ) SIP_DEPRECATED;

Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsmaprendererjob.cpp
Expand Up @@ -792,7 +792,7 @@ QImage QgsMapRendererJob::composeImage(
painter.setOpacity( job.opacity );

#if DEBUG_RENDERING
img->save( QString( "/tmp/final_%1.png" ).arg( i ) );
img.save( QString( "/tmp/final_%1.png" ).arg( i ) );
i++;
#endif

Expand Down Expand Up @@ -847,9 +847,9 @@ QImage QgsMapRendererJob::layerImageToBeComposed(
}
else
{
if ( cache && cache->hasAnyCacheImage( job.layer->id() ) )
if ( cache && cache->hasAnyCacheImage( job.layerId ) )
{
return cache->transformedCacheImage( job.layer->id(), settings.mapToPixel() );
return cache->transformedCacheImage( job.layerId, settings.mapToPixel() );
}
else
return QImage();
Expand Down

0 comments on commit 9bff34e

Please sign in to comment.