Use a power of two division factor

Using a power of 2 instead of power of 10 means the result of the
division can be accurately represented as a floating point instead of
being an approximation that could lead to rounding errors.

Change-Id: I8910c06113ec6b69c60ff95d59894bfb56133186
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
bb10
Allan Sandfeld Jensen 2015-09-18 13:49:49 +02:00
parent d72da0b4b2
commit c9697677f4
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ public:
int colorCount() const { return metric(PdmNumColors); }
int depth() const { return metric(PdmDepth); }
static inline qreal devicePixelRatioFScale() {return 10000000.0; }
static inline qreal devicePixelRatioFScale() { return 0x10000; }
protected:
QPaintDevice() Q_DECL_NOEXCEPT;
virtual int metric(PaintDeviceMetric metric) const;