Skip to content
Permalink
Browse files
Fix for bug #1347, no label buffers in composer image output
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9545 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Oct 25, 2008
1 parent e060800 commit fd78469b00d8aff57403f6cb2e92ac025d325a59
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/core/qgslabel.cpp
@@ -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() )
{
@@ -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 );

0 comments on commit fd78469

Please sign in to comment.