Merged a few changes from QCustomPlot's GIT repo that haven't made it
to a release yet. Turned off OpenGL as it has troubles on some machines.
This commit is contained in:
+9
-2
@@ -9262,11 +9262,14 @@ void QCPAxisPainterPrivate::placeTickLabel(QCPPainter *painter, double position,
|
||||
{
|
||||
cachedLabel->pixmap = QPixmap(labelData.rotatedTotalBounds.size()*mParentPlot->bufferDevicePixelRatio());
|
||||
#ifdef QCP_DEVICEPIXELRATIO_SUPPORTED
|
||||
# ifdef QCP_DEVICEPIXELRATIO_FLOAT
|
||||
cachedLabel->pixmap.setDevicePixelRatio(mParentPlot->devicePixelRatioF());
|
||||
# else
|
||||
cachedLabel->pixmap.setDevicePixelRatio(mParentPlot->devicePixelRatio());
|
||||
# endif
|
||||
#endif
|
||||
} else
|
||||
cachedLabel->pixmap = QPixmap(labelData.rotatedTotalBounds.size());
|
||||
cachedLabel->pixmap = QPixmap(labelData.rotatedTotalBounds.size());
|
||||
cachedLabel->pixmap.fill(Qt::transparent);
|
||||
QCPPainter cachePainter(&cachedLabel->pixmap);
|
||||
cachePainter.setPen(painter->pen());
|
||||
@@ -12629,7 +12632,11 @@ QCustomPlot::QCustomPlot(QWidget *parent) :
|
||||
currentLocale.setNumberOptions(QLocale::OmitGroupSeparator);
|
||||
setLocale(currentLocale);
|
||||
#ifdef QCP_DEVICEPIXELRATIO_SUPPORTED
|
||||
# ifdef QCP_DEVICEPIXELRATIO_FLOAT
|
||||
setBufferDevicePixelRatio(QWidget::devicePixelRatioF());
|
||||
# else
|
||||
setBufferDevicePixelRatio(QWidget::devicePixelRatio());
|
||||
# endif
|
||||
#endif
|
||||
|
||||
mOpenGlAntialiasedElementsBackup = mAntialiasedElements;
|
||||
@@ -17579,7 +17586,7 @@ void QCPAxisRect::mouseMoveEvent(QMouseEvent *event, const QPointF &startPos)
|
||||
{
|
||||
if (mParentPlot->noAntialiasingOnDrag())
|
||||
mParentPlot->setNotAntialiasedElements(QCP::aeAll);
|
||||
mParentPlot->replot();
|
||||
mParentPlot->replot(QCustomPlot::rpQueuedReplot);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
-1
@@ -41,7 +41,11 @@
|
||||
#endif
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
||||
#define QCP_DEVICEPIXELRATIO_SUPPORTED
|
||||
# define QCP_DEVICEPIXELRATIO_SUPPORTED
|
||||
# if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
|
||||
# define QCP_DEVICEPIXELRATIO_FLOAT
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
@@ -68,7 +68,8 @@ GraphingWindow::GraphingWindow(const QVector<CANFrame> *frames, QWidget *parent)
|
||||
|
||||
ui->graphingView->setAttribute(Qt::WA_AcceptTouchEvents);
|
||||
|
||||
ui->graphingView->setOpenGl(true); //purdy and fast drawing courtesy of your video card - pretty everyone has 3D accel these days
|
||||
//ui->graphingView->setOpenGl(true); //purdy and fast drawing courtesy of your video card - pretty everyone has 3D accel these days
|
||||
ui->graphingView->setAntialiasedElements(QCP::aeNone);
|
||||
|
||||
needScaleSetup = true;
|
||||
followGraphEnd = false;
|
||||
|
||||
Reference in New Issue
Block a user