|
@@
-1574,7
+1574,10
void QCPLayerable::applyAntialiasingHint(QCPPainter *painter, bool localAntialia
|
|
1574
|
|
|
1574
|
|
|
1575
|
\see initializeParentPlot
|
|
1575
|
\see initializeParentPlot
|
|
1576
|
*/
|
|
1576
|
*/
|
|
1577
|
void QCPLayerable::parentPlotInitialized(QCustomPlot *parentPlot){Q_UNUSED(parentPlot)}
|
|
1577
|
void QCPLayerable::parentPlotInitialized(QCustomPlot *parentPlot)
|
|
|
|
|
1578
|
{
|
|
|
|
|
1579
|
Q_UNUSED(parentPlot)
|
|
|
|
|
1580
|
}
|
|
1578
|
|
|
1581
|
|
|
1579
|
/*! \internal
|
|
1582
|
/*! \internal
|
|
1580
|
|
|
1583
|
|
|
@@
-9254,14
+9257,12
void QCPAxisPainterPrivate::draw(QCPPainter *painter)
|
|
9254
|
painter->setBrush(QBrush(basePen.color()));
|
|
9257
|
painter->setBrush(QBrush(basePen.color()));
|
|
9255
|
QCPVector2D baseLineVector(baseLine.dx(), baseLine.dy());
|
|
9258
|
QCPVector2D baseLineVector(baseLine.dx(), baseLine.dy());
|
|
9256
|
if (lowerEnding.style() != QCPLineEnding::esNone)
|
|
9259
|
if (lowerEnding.style() != QCPLineEnding::esNone)
|
|
9257
|
lowerEnding.draw(painter,
|
|
9260
|
lowerEnding.draw(painter, QCPVector2D(baseLine.p1())
|
|
9258
|
QCPVector2D(baseLine.p1())
|
|
|
|
|
9259
|
- baseLineVector.normalized() * lowerEnding.realLength()
|
|
9261
|
- baseLineVector.normalized() * lowerEnding.realLength()
|
|
9260
|
* (lowerEnding.inverted() ? -1 : 1),
|
|
9262
|
* (lowerEnding.inverted() ? -1 : 1),
|
|
9261
|
-baseLineVector);
|
|
9263
|
-baseLineVector);
|
|
9262
|
if (upperEnding.style() != QCPLineEnding::esNone)
|
|
9264
|
if (upperEnding.style() != QCPLineEnding::esNone)
|
|
9263
|
upperEnding.draw(painter,
|
|
9265
|
upperEnding.draw(painter, QCPVector2D(baseLine.p2())
|
|
9264
|
QCPVector2D(baseLine.p2())
|
|
|
|
|
9265
|
+ baseLineVector.normalized() * upperEnding.realLength()
|
|
9266
|
+ baseLineVector.normalized() * upperEnding.realLength()
|
|
9266
|
* (upperEnding.inverted() ? -1 : 1),
|
|
9267
|
* (upperEnding.inverted() ? -1 : 1),
|
|
9267
|
baseLineVector);
|
|
9268
|
baseLineVector);
|
|
@@
-16468,8
+16469,7
void QCPColorGradient::updateColorBuffer()
|
|
16468
|
hue -= 1.0;
|
|
16469
|
hue -= 1.0;
|
|
16469
|
if (useAlpha) {
|
|
16470
|
if (useAlpha) {
|
|
16470
|
const QRgb rgb
|
|
16471
|
const QRgb rgb
|
|
16471
|
= QColor::fromHsvF(hue,
|
|
16472
|
= QColor::fromHsvF(hue, (1 - t) * lowHsv.saturationF()
|
|
16472
|
(1 - t) * lowHsv.saturationF()
|
|
|
|
|
16473
|
+ t * highHsv.saturationF(),
|
|
16473
|
+ t * highHsv.saturationF(),
|
|
16474
|
(1 - t) * lowHsv.valueF() + t * highHsv.valueF())
|
|
16474
|
(1 - t) * lowHsv.valueF() + t * highHsv.valueF())
|
|
16475
|
.rgb();
|
|
16475
|
.rgb();
|
|
@@
-16479,8
+16479,7
void QCPColorGradient::updateColorBuffer()
|
|
16479
|
}
|
|
16479
|
}
|
|
16480
|
else {
|
|
16480
|
else {
|
|
16481
|
mColorBuffer[i]
|
|
16481
|
mColorBuffer[i]
|
|
16482
|
= QColor::fromHsvF(hue,
|
|
16482
|
= QColor::fromHsvF(hue, (1 - t) * lowHsv.saturationF()
|
|
16483
|
(1 - t) * lowHsv.saturationF()
|
|
|
|
|
16484
|
+ t * highHsv.saturationF(),
|
|
16483
|
+ t * highHsv.saturationF(),
|
|
16485
|
(1 - t) * lowHsv.valueF() + t * highHsv.valueF())
|
|
16484
|
(1 - t) * lowHsv.valueF() + t * highHsv.valueF())
|
|
16486
|
.rgb();
|
|
16485
|
.rgb();
|
|
@@
-19839,12
+19838,10
void QCPColorScale::update(UpdatePhase phase)
|
|
19839
|
switch (phase) {
|
|
19838
|
switch (phase) {
|
|
19840
|
case upMargins: {
|
|
19839
|
case upMargins: {
|
|
19841
|
if (mType == QCPAxis::atBottom || mType == QCPAxis::atTop) {
|
|
19840
|
if (mType == QCPAxis::atBottom || mType == QCPAxis::atTop) {
|
|
19842
|
setMaximumSize(QWIDGETSIZE_MAX,
|
|
19841
|
setMaximumSize(QWIDGETSIZE_MAX, mBarWidth + mAxisRect.data()->margins().top()
|
|
19843
|
mBarWidth + mAxisRect.data()->margins().top()
|
|
19842
|
+ mAxisRect.data()->margins().bottom()
|
|
19844
|
+ mAxisRect.data()->margins().bottom() + margins().top()
|
|
19843
|
+ margins().top() + margins().bottom());
|
|
19845
|
+ margins().bottom());
|
|
19844
|
setMinimumSize(0, mBarWidth + mAxisRect.data()->margins().top()
|
|
19846
|
setMinimumSize(0,
|
|
|
|
|
19847
|
mBarWidth + mAxisRect.data()->margins().top()
|
|
|
|
|
19848
|
+ mAxisRect.data()->margins().bottom() + margins().top()
|
|
19845
|
+ mAxisRect.data()->margins().bottom() + margins().top()
|
|
19849
|
+ margins().bottom());
|
|
19846
|
+ margins().bottom());
|
|
19850
|
}
|
|
19847
|
}
|