! Sets the device pixel ratio to \a ratio. This is useful to render on high-DPI output devices. The ratio is automatically set to the device pixel ratio used by the parent QCustomPlot instance. The buffer is reallocated (by calling \ref reallocateBuffer), so any painters that were obtained by \ref startPainting are invalidated and must not be used after calling this method. \note This
| 636 | \note This method is only available for Qt versions 5.4 and higher. |
| 637 | */ |
| 638 | void QCPAbstractPaintBuffer::setDevicePixelRatio(double ratio) |
| 639 | { |
| 640 | if (!qFuzzyCompare(ratio, mDevicePixelRatio)) |
| 641 | { |
| 642 | #ifdef QCP_DEVICEPIXELRATIO_SUPPORTED |
| 643 | mDevicePixelRatio = ratio; |
| 644 | reallocateBuffer(); |
| 645 | #else |
| 646 | qDebug() << Q_FUNC_INFO << "Device pixel ratios not supported for Qt versions before 5.4"; |
| 647 | mDevicePixelRatio = 1.0; |
| 648 | #endif |
| 649 | } |
| 650 | } |
| 651 | |
| 652 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 653 | //////////////////// QCPPaintBufferPixmap |
no outgoing calls
no test coverage detected