Skip to content

Commit

Permalink
Fix selective masking causes features to bleed outside layout map
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 28, 2024
1 parent 76a12b9 commit e746797
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/core/maprenderer/qgsmaprendererjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,12 @@ std::vector< LayerRenderJob > QgsMapRendererJob::prepareSecondPassJobs( std::vec
{
PictureAndPainter pictureAndPainter = allocatePictureAndPainter( job.context() );
job.picture = std::move( pictureAndPainter.first );
if ( job.context()->painter()->hasClipping() )
{
// need to copy clipping paths from original painter, so that e.g. the layout map bounds clipping path is respected
pictureAndPainter.second->setClipping( true );
pictureAndPainter.second->setClipPath( job.context()->painter()->clipPath() );
}
job.context()->setPainter( pictureAndPainter.second );
// force recreation of layer renderer so it initialize correctly the renderer
// especially the RasterLayerRender that need logicalDpiX from painting device
Expand Down Expand Up @@ -955,6 +961,12 @@ std::vector< LayerRenderJob > QgsMapRendererJob::prepareSecondPassJobs( std::vec
else
{
PictureAndPainter pictureAndPainter = allocatePictureAndPainter( job2.context() );
if ( job.context()->painter()->hasClipping() )
{
// need to copy clipping paths from original painter, so that e.g. the layout map bounds clipping path is respected
pictureAndPainter.second->setClipping( true );
pictureAndPainter.second->setClipPath( job.context()->painter()->clipPath() );
}
job2.picture = std::move( pictureAndPainter.first );
job2.context()->setPainter( pictureAndPainter.second );
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e746797

Please sign in to comment.