MCPcopy Create free account
hub / github.com/LUX-Core/lux / setDevicePixelRatio

Method setDevicePixelRatio

src/qt/qcustomplot.cpp:627–639  ·  view source on GitHub ↗

! Sets the 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 T

Source from the content-addressed store, hash-verified

625 \note This method is only available for Qt versions 5.4 and higher.
626*/
627void QCPAbstractPaintBuffer::setDevicePixelRatio(double ratio)
628{
629 if (!qFuzzyCompare(ratio, mDevicePixelRatio))
630 {
631#ifdef QCP_DEVICEPIXELRATIO_SUPPORTED
632 mDevicePixelRatio = ratio;
633 reallocateBuffer();
634#else
635 qDebug() << Q_FUNC_INFO << "Device pixel ratios not supported for Qt versions before 5.4";
636 mDevicePixelRatio = 1.0;
637#endif
638 }
639}
640
641////////////////////////////////////////////////////////////////////////////////////////////////////
642//////////////////// QCPPaintBufferPixmap

Callers 4

reallocateBufferMethod · 0.80
placeTickLabelMethod · 0.80
updateScaledPixmapMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected