Skip to content

Commit

Permalink
Webkit seems to assume a standard dpi of 96
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Aug 7, 2012
1 parent 7e97033 commit a003f74
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/core/composer/qgscomposerhtml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "qgscomposition.h"
#include "qgsaddremovemultiframecommand.h"
#include <QCoreApplication>
#include <QImage>
#include <QPainter>
#include <QWebFrame>
#include <QWebPage>
Expand Down Expand Up @@ -108,9 +107,7 @@ double QgsComposerHtml::htmlUnitsToMM()
return 1.0;
}

QImage img( 1, 1, QImage::Format_ARGB32_Premultiplied );
double pixelPerMM = mComposition->printResolution() / 25.4;
return ( pixelPerMM / ( img.dotsPerMeterX() / 1000.0 ) );
return ( mComposition->printResolution() / 96.0 ); //webkit seems to assume a standard dpi of 96
}

void QgsComposerHtml::addFrame( QgsComposerFrame* frame, bool addCommand )
Expand Down

0 comments on commit a003f74

Please sign in to comment.