Skip to content
Permalink
Browse files

Fix for preview symbols in GetLegendGraphic

  • Loading branch information
mhugent committed Jan 14, 2012
1 parent e800caa commit 5ed02dbbb50ac773caafb88c7c2a0a5712ccd840
Showing with 2 additions and 4 deletions.
  1. +2 −4 src/mapserver/qgswmsserver.cpp
@@ -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();
}
}

0 comments on commit 5ed02db

Please sign in to comment.
You can’t perform that action at this time.