- void resetScreen()
- {
- delete screen_;
- pixel_ratio_ = p->pixelRatio();
- if (lyxrc.use_qimage) {
- QImage *x =
- new QImage(static_cast<int>(pixel_ratio_ * p->viewport()->width()),
- static_cast<int>(pixel_ratio_ * p->viewport()->height()),
- QImage::Format_ARGB32_Premultiplied);
-#if QT_VERSION >= 0x050000
- x->setDevicePixelRatio(pixel_ratio_);
-#endif
- screen_ = x;
- } else {
- QPixmap *x =
- new QPixmap(static_cast<int>(pixel_ratio_ * p->viewport()->width()),
- static_cast<int>(pixel_ratio_ * p->viewport()->height()));
-#if QT_VERSION >= 0x050000
- x->setDevicePixelRatio(pixel_ratio_);
-#endif
- screen_ = x;
- }
- }