! Sets the device pixel ratio used by the paint buffers of this QCustomPlot instance. Normally, this doesn't need to be set manually, because it is initialized with the regular \a QWidget::devicePixelRatio which is configured by Qt to fit the display device (e.g. 1 for normal displays, 2 for High-DPI displays). Device pixel ratios are supported by Qt only for Qt versions since 5.4. If
| 14136 | leaves the internal buffer device pixel ratio at 1.0. |
| 14137 | */ |
| 14138 | void QCustomPlot::setBufferDevicePixelRatio(double ratio) |
| 14139 | { |
| 14140 | if (!qFuzzyCompare(ratio, mBufferDevicePixelRatio)) |
| 14141 | { |
| 14142 | #ifdef QCP_DEVICEPIXELRATIO_SUPPORTED |
| 14143 | mBufferDevicePixelRatio = ratio; |
| 14144 | foreach (QSharedPointer<QCPAbstractPaintBuffer> buffer, mPaintBuffers) |
| 14145 | buffer->setDevicePixelRatio(mBufferDevicePixelRatio); |
| 14146 | // Note: axis label cache has devicePixelRatio as part of cache hash, so no need to manually clear cache here |
| 14147 | #else |
| 14148 | qDebug() << Q_FUNC_INFO << "Device pixel ratios not supported for Qt versions before 5.4"; |
| 14149 | mBufferDevicePixelRatio = 1.0; |
| 14150 | #endif |
| 14151 | } |
| 14152 | } |
| 14153 | |
| 14154 | /*! |
| 14155 | Sets \a pm as the viewport background pixmap (see \ref setViewport). The pixmap is always drawn |
nothing calls this directly
no test coverage detected