Skip to content

Commit

Permalink
[layouts] avoid adding too much bleeding pixels for page items (#5910)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Dec 19, 2017
1 parent 70d61fd commit cefae89
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/layout/qgslayoutitempage.cpp
Expand Up @@ -228,7 +228,10 @@ void QgsLayoutItemPage::draw( QgsRenderContext &context, const QStyleOptionGraph
//Now subtract 1 pixel to prevent semi-transparent borders at edge of solid page caused by
//anti-aliased painting. This may cause a pixel to be cropped from certain edge lines/symbols,
//but that can be counteracted by adding a dummy transparent line symbol layer with a wider line width
maxBleedPixels = std::floor( maxBleedPixels - 2 );
if ( !mLayout->context().isPreviewRender() || !qgsDoubleNear( maxBleedPixels, 0.0 ) )
{
maxBleedPixels = std::floor( maxBleedPixels - 2 );
}

// round up
QPolygonF pagePolygon = QPolygonF( QRectF( maxBleedPixels, maxBleedPixels,
Expand Down

0 comments on commit cefae89

Please sign in to comment.