Skip to content

Commit

Permalink
Use a tolerance to decide if a point symbol may be used from cached. …
Browse files Browse the repository at this point in the history
…Because on some systems, dpi in x- and y-direction are different and so the scaleProduct is not exactly 1

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11444 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Aug 19, 2009
1 parent d233cee commit 357fb0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/symbology/qgssymbol.cpp
Expand Up @@ -381,8 +381,10 @@ QImage QgsSymbol::getCachedPointSymbolAsImage( double widthScale, bool selected,
QImage QgsSymbol::getPointSymbolAsImage( double widthScale, bool selected, QColor selectionColor, double scale,
double rotation, double rasterScaleFactor, double opacity )
{
double scaleProduct = scale * rasterScaleFactor;

if ( 1.0 == ( scale * rasterScaleFactor ) && 0 == rotation )
//on systems where dpi in x- and y-direction are not the same, the scaleProduct may differ from 1.0 by a very small number
if ( scaleProduct > 0.9 && scaleProduct < 1.1 && 0 == rotation )
{
if ( mWidthScale < 0 || widthScale == mWidthScale )
{
Expand Down

0 comments on commit 357fb0a

Please sign in to comment.