diff options
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r-- | src/opengl/qgl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index c62e09b3f3..63ebf14bd5 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4496,7 +4496,7 @@ QImage QGLWidget::grabFrameBuffer(bool withAlpha) { makeCurrent(); QImage res; - qreal pixelRatio = devicePixelRatio(); + qreal pixelRatio = devicePixelRatioF(); int w = pixelRatio * width(); int h = pixelRatio * height(); if (format().rgba()) @@ -4909,7 +4909,7 @@ void QGLWidget::renderText(double x, double y, double z, const QString &str, con GLdouble win_x = 0, win_y = 0, win_z = 0; qgluProject(x, y, z, &model[0], &proj[0], &view[0], &win_x, &win_y, &win_z); - const int dpr = d->glcx->device()->devicePixelRatio(); + const int dpr = d->glcx->device()->devicePixelRatioF(); win_x /= dpr; win_y /= dpr; win_y = height - win_y; // y is inverted |