Skip to content
Permalink
Browse files

Use a tolerance to decide if a point symbol may be used from cached. …

…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
mhugent committed Aug 19, 2009
1 parent d233cee commit 357fb0aae2633ab468f15d2f1e655418790e7343
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/core/symbology/qgssymbol.cpp
@@ -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 )
{

0 comments on commit 357fb0a

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