Skip to content

Commit

Permalink
Use QPrinter instead of QPixmap to find out screen resolution
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@8658 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jun 20, 2008
1 parent aff0f86 commit f609279
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/qgsprojectfiletransform.cpp
Expand Up @@ -22,7 +22,7 @@
#include "qgslogger.h"
#include <QTextStream>
#include <QDomDocument>
#include <QPixmap> //to find out screen resolution
#include <QPrinter> //to find out screen resolution

typedef QgsProjectVersion PFV;

Expand Down Expand Up @@ -242,8 +242,8 @@ void QgsProjectFileTransform::transform0100to0110()
if ( ! mDom.isNull() )
{
//Change 'outlinewidth' in QgsSymbol
QPixmap thePixmap;
int screenDpi = (thePixmap.logicalDpiX() + thePixmap.logicalDpiY()) / 2;
QPrinter myPrinter ( QPrinter::ScreenResolution );
int screenDpi = myPrinter.resolution();
double widthScaleFactor = 25.4 / screenDpi;

QDomNodeList outlineWidthList = mDom.elementsByTagName("outlinewidth");
Expand Down

0 comments on commit f609279

Please sign in to comment.