Skip to content

Commit cefae89

Browse files
authoredDec 19, 2017
[layouts] avoid adding too much bleeding pixels for page items (#5910)
1 parent 70d61fd commit cefae89

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎src/core/layout/qgslayoutitempage.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,10 @@ void QgsLayoutItemPage::draw( QgsRenderContext &context, const QStyleOptionGraph
228228
//Now subtract 1 pixel to prevent semi-transparent borders at edge of solid page caused by
229229
//anti-aliased painting. This may cause a pixel to be cropped from certain edge lines/symbols,
230230
//but that can be counteracted by adding a dummy transparent line symbol layer with a wider line width
231-
maxBleedPixels = std::floor( maxBleedPixels - 2 );
231+
if ( !mLayout->context().isPreviewRender() || !qgsDoubleNear( maxBleedPixels, 0.0 ) )
232+
{
233+
maxBleedPixels = std::floor( maxBleedPixels - 2 );
234+
}
232235

233236
// round up
234237
QPolygonF pagePolygon = QPolygonF( QRectF( maxBleedPixels, maxBleedPixels,

0 commit comments

Comments
 (0)
Please sign in to comment.