Skip to content

Commit

Permalink
[symbology] Fix point pattern displacement logic to match pre 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed May 27, 2019
1 parent d7fa028 commit 21940e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/symbology/qgsfillsymbollayer.cpp
Expand Up @@ -3233,7 +3233,7 @@ void QgsPointPatternFillSymbolLayer::applyPattern( const QgsSymbolRenderContext
{
for ( double currentY = -height; currentY <= height * 2.0; currentY += height / 2.0 )
{
mMarkerSymbol->renderPoint( QPointF( currentX + widthOffset, currentY + heightOffset - displacementPixelY ), context.feature(), pointRenderContext );
mMarkerSymbol->renderPoint( QPointF( currentX + widthOffset + ( std::fmod( currentY, height ) != 0 ? displacementPixelX : 0 ), currentY + heightOffset - displacementPixelY ), context.feature(), pointRenderContext );
}
}

Expand Down

0 comments on commit 21940e1

Please sign in to comment.