Skip to content

Commit

Permalink
Change last composition from SourceOver to DestinationOver. This fix …
Browse files Browse the repository at this point in the history
…the composition of unsmasked element with masked element under the maske when masked element has some alpha blending. This fix tests 'mask_with_effect' and test 'layout_export'.
  • Loading branch information
obrix authored and nyalldawson committed Jun 7, 2020
1 parent 171a44a commit f13ae97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsmaprendererjob.cpp
Expand Up @@ -854,7 +854,7 @@ void QgsMapRendererJob::composeSecondPass( LayerRenderJobs &secondPassJobs, Labe
job.firstPassJob->img->save( QString( "/tmp/second_%1_first_pass_2.png" ).arg( i ) );
#endif
// ... and overpaint the second pass' image on it
painter1->setCompositionMode( QPainter::CompositionMode_SourceOver );
painter1->setCompositionMode( QPainter::CompositionMode_DestinationOver );
painter1->drawImage( 0, 0, *job.img );
#if DEBUG_RENDERING
job.img->save( QString( "/tmp/second_%1_b.png" ).arg( i ) );
Expand Down

0 comments on commit f13ae97

Please sign in to comment.