Skip to content

Commit

Permalink
Fix for preview symbols in GetLegendGraphic
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent authored and alexbruy committed Jan 31, 2012
1 parent 33e1359 commit a4c39a6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/mapserver/qgswmsserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1638,14 +1638,12 @@ void QgsWMSServer::drawLegendSymbolV2( QgsComposerLegendItem* item, QPainter* p,
symbolHeight = markerSymbol->size() * dpi / 25.4;
}

double rasterScaleFactor = dpi / 2.0 / 25.4;

if ( p )
{
p->save();
p->translate( boxSpace, currentY + yDownShift );
p->scale( 1.0 / rasterScaleFactor, 1.0 / rasterScaleFactor );
symbol->drawPreviewIcon( p, QSize( symbolWidth * rasterScaleFactor, symbolHeight * rasterScaleFactor ) );
p->scale( 1.0, 1.0 );
symbol->drawPreviewIcon( p, QSize( symbolWidth, symbolHeight ) );
p->restore();
}
}
Expand Down

0 comments on commit a4c39a6

Please sign in to comment.