Skip to content

Commit

Permalink
Fix for bug #1347, no label buffers in composer image output
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@9545 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Oct 25, 2008
1 parent adc0124 commit 49eeb8a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/qgslabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ void QgsLabel::renderLabel( QPainter* painter, QgsPoint point,
//
if ( mLabelAttributes->bufferSizeIsSet() && mLabelAttributes->bufferEnabled() )
{
int myBufferSize = static_cast<int>( mLabelAttributes->bufferSize() * 0.3527 * sizeScale );
double myBufferSize = mLabelAttributes->bufferSize() * 0.3527 * sizeScale;
QPen bufferPen;
if ( mLabelAttributes->bufferColorIsSet() )
{
Expand All @@ -427,12 +427,12 @@ void QgsLabel::renderLabel( QPainter* painter, QgsPoint point,
}
else //draw more dense in case of logical devices
{
bufferStepSize = 0.25;
bufferStepSize = 0.1;
}

for ( double i = dx - myBufferSize; i <= dx + myBufferSize; i += 0.25 )
for ( double i = dx - myBufferSize; i <= dx + myBufferSize; i += bufferStepSize )
{
for ( double j = dy - myBufferSize; j <= dy + myBufferSize; j += 0.25 )
for ( double j = dy - myBufferSize; j <= dy + myBufferSize; j += bufferStepSize )
{
if ( mLabelAttributes->multilineEnabled() )
painter->drawText( QRectF( i, j - height, width, height ), alignment, text );
Expand Down

0 comments on commit 49eeb8a

Please sign in to comment.