Skip to content

Commit

Permalink
Fix slight offset in heatmap renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 25, 2014
1 parent 554d55d commit 9cf3e7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/symbology-ng/qgsheatmaprenderer.cpp
Expand Up @@ -141,8 +141,8 @@ bool QgsHeatmapRenderer::renderFeature( QgsFeature& feature, QgsRenderContext& c
for ( QgsMultiPoint::const_iterator pointIt = multiPoint.constBegin(); pointIt != multiPoint.constEnd(); ++pointIt )
{
QgsPoint pixel = context.mapToPixel().transform( *pointIt );
int pointX = pixel.x() / mRenderQuality + 1;
int pointY = pixel.y() / mRenderQuality + 1;
int pointX = pixel.x() / mRenderQuality;
int pointY = pixel.y() / mRenderQuality;
for ( int x = qMax( pointX - mRadiusPixels, 0 ); x < qMin( pointX + mRadiusPixels, width ); ++x )
{
for ( int y = qMax( pointY - mRadiusPixels, 0 ); y < qMin( pointY + mRadiusPixels, height ); ++y )
Expand Down

0 comments on commit 9cf3e7f

Please sign in to comment.