Changeset View
Changeset View
Standalone View
Standalone View
kmplot/view.cpp
Show First 20 Lines • Show All 2921 Lines • ▼ Show 20 Line(s) | |||||
2922 | 2922 | | |||
2923 | void View::resizeEvent(QResizeEvent *) | 2923 | void View::resizeEvent(QResizeEvent *) | ||
2924 | { | 2924 | { | ||
2925 | if (m_isDrawing) //stop drawing integrals | 2925 | if (m_isDrawing) //stop drawing integrals | ||
2926 | { | 2926 | { | ||
2927 | m_stopCalculating = true; //stop drawing | 2927 | m_stopCalculating = true; //stop drawing | ||
2928 | return; | 2928 | return; | ||
2929 | } | 2929 | } | ||
2930 | buffer = QPixmap( size() ); | 2930 | qreal dpr = devicePixelRatioF(); | ||
2931 | buffer = QPixmap( size() * dpr ); | ||||
2932 | buffer.setDevicePixelRatio(dpr); | ||||
2931 | drawPlot(); | 2933 | drawPlot(); | ||
2932 | } | 2934 | } | ||
2933 | 2935 | | |||
2934 | 2936 | | |||
2935 | void View::drawPlot() | 2937 | void View::drawPlot() | ||
2936 | { | 2938 | { | ||
2937 | if ( buffer.width() == 0 || buffer.height() == 0 ) | 2939 | if ( buffer.width() == 0 || buffer.height() == 0 ) | ||
2938 | return; | 2940 | return; | ||
▲ Show 20 Lines • Show All 1337 Lines • Show Last 20 Lines |