Skip to content

Commit a003f74

Browse files
committedAug 7, 2012
Webkit seems to assume a standard dpi of 96
1 parent 7e97033 commit a003f74

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed
 

‎src/core/composer/qgscomposerhtml.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "qgscomposition.h"
1919
#include "qgsaddremovemultiframecommand.h"
2020
#include <QCoreApplication>
21-
#include <QImage>
2221
#include <QPainter>
2322
#include <QWebFrame>
2423
#include <QWebPage>
@@ -108,9 +107,7 @@ double QgsComposerHtml::htmlUnitsToMM()
108107
return 1.0;
109108
}
110109

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

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

0 commit comments

Comments
 (0)
Please sign in to comment.