Skip to content

Commit

Permalink
Fix #9661 (labels in composer rendered with wrong size)
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Feb 26, 2014
1 parent cb919e9 commit daf1e0b
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/core/qgspallabeling.cpp
Expand Up @@ -3910,15 +3910,6 @@ void QgsPalLabeling::drawLabeling( QgsRenderContext& context )


painter->setRenderHint( QPainter::Antialiasing ); painter->setRenderHint( QPainter::Antialiasing );


//dpi ration for QPicture
QPicture localPict;
QPainter localp;
localp.begin( &localPict );
double localdpi = ( localp.device()->logicalDpiX() + localp.device()->logicalDpiY() ) / 2;
double contextdpi = ( painter->device()->logicalDpiX() + painter->device()->logicalDpiY() ) / 2;
double dpiRatio = localdpi / contextdpi;
localp.end();

// draw the labels // draw the labels
std::list<LabelPosition*>::iterator it = labels->begin(); std::list<LabelPosition*>::iterator it = labels->begin();
for ( ; it != labels->end(); ++it ) for ( ; it != labels->end(); ++it )
Expand Down Expand Up @@ -4018,15 +4009,15 @@ void QgsPalLabeling::drawLabeling( QgsRenderContext& context )


if ( tmpLyr.shapeDraw ) if ( tmpLyr.shapeDraw )
{ {
drawLabel( *it, context, tmpLyr, LabelShape, dpiRatio ); drawLabel( *it, context, tmpLyr, LabelShape );
} }


if ( tmpLyr.bufferDraw ) if ( tmpLyr.bufferDraw )
{ {
drawLabel( *it, context, tmpLyr, LabelBuffer, dpiRatio ); drawLabel( *it, context, tmpLyr, LabelBuffer );
} }


drawLabel( *it, context, tmpLyr, LabelText, dpiRatio ); drawLabel( *it, context, tmpLyr, LabelText );


if ( mResults->mLabelSearchTree ) if ( mResults->mLabelSearchTree )
{ {
Expand Down

0 comments on commit daf1e0b

Please sign in to comment.