Skip to content

Commit 7e79302

Browse files
committed
Fix placement of simple markers in cached images
1 parent 037f601 commit 7e79302

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/core/symbology-ng/qgsmarkersymbollayerv2.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,7 @@ void QgsSimpleMarkerSymbolLayerV2::prepareCache( QgsSymbolV2RenderContext& conte
183183
// calculate necessary image size for the cache
184184
double pw = (( mPen.widthF() == 0 ? 1 : mPen.widthF() ) + 1 ) / 2 * 2; // make even (round up); handle cosmetic pen
185185
int imageSize = (( int ) scaledSize + pw ) / 2 * 2 + 1; // make image width, height odd; account for pen width
186-
187-
double center = (( double ) imageSize / 2 ) + 0.5; // add 1/2 pixel for proper rounding when the figure's coordinates are added
186+
double center = imageSize / 2.0;
188187

189188
mCache = QImage( QSize( imageSize, imageSize ), QImage::Format_ARGB32_Premultiplied );
190189
mCache.fill( 0 );

0 commit comments

Comments
 (0)