Skip to content
Permalink
Browse files

[layouts] avoid adding too much bleeding pixels for page items (#5910)

  • Loading branch information
nirvn committed Dec 19, 2017
1 parent 70d61fd commit cefae89a8ee6047caecd37bc5740c22dc46457b9
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/core/layout/qgslayoutitempage.cpp
@@ -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,

0 comments on commit cefae89

Please sign in to comment.
You can’t perform that action at this time.