[Kst] [Bug 90932] nan values are interpolated
Andrew Walker
arwalker at sumusltd.com
Thu Oct 7 23:42:17 CEST 2004
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=90932
arwalker sumusltd com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From arwalker sumusltd com 2004-10-07 23:42 -------
CVS commit by arwalker:
Do not interpolate across NaN values.
CCMAIL: 90932-done bugs kde org
M +147 -139 kst2dplot.cpp 1.279
--- kdeextragear-2/kst/kst/kst2dplot.cpp #1.278:1.279
@ -1826,5 +1826,4 @ void Kst2DPlot::resize(const QSize& size
void Kst2DPlot::updateTieBox(QPainter& p) {
- //kdDebug() << "Update tie box for " << tagName() << endl;
QRect tr = GetTieBoxRegion();
p.setPen(foregroundColor());
@ -1862,5 +1861,7 @ void Kst2DPlot::paint(KstPaintType type,
}
- /* check for optimizations */
+ //
+ // check for optimizations
+ //
QSize sizeNew = size();
QRect alignment = KST::alignment.limits(geometry());
@ -1928,5 +1929,7 @ void Kst2DPlot::draw() {
void Kst2DPlot::draw(QPainter &p, KstPaintType type, double resolutionEnhancement) {
- /* Draws to the buffer */
+ //
+ // draws to the buffer
+ //
if (_zoomPaused) {
@ -2865,9 +2868,9 @ void Kst2DPlot::highlightNearestDataPoin
}
if (found) {
- QString comma;
if (!msg.isEmpty()) {
- comma = ", ";
+ msg = QString("%5, %4 (%1, %2, %3)").arg(xpos,0,'G').arg(ypos,0,'G').arg(Z,0,'G').arg(_images[i+1]->tagName()).arg(msg);
+ } else {
+ msg = QString("%4 (%1, %2, %3)").arg(xpos,0,'G').arg(ypos,0,'G').arg(Z,0,'G').arg(_images[i+1]->tagName());
}
- msg += comma + QString("%4 (%1, %2, %3)").arg(xpos,0,'G').arg(ypos,0,'G').arg(Z,0,'G').arg(_images[i+1]->tagName());
}
}
@ -4782,4 +4785,5 @ void Kst2DPlot::plotCurves(QPainter& p,
if (c->hasLines()) {
QPointArray points(MAX_NUM_POLYLINES);
+ bool foundNan;
int lastPlottedX = 0;
int lastPlottedY = 0;
@ -4825,4 +4829,5 @ void Kst2DPlot::plotCurves(QPainter& p,
c->point(++i_pt, rX, rY);
+ foundNan = false;
//
@ -4831,4 +4836,5 @ void Kst2DPlot::plotCurves(QPainter& p,
while ((isnan(rX) || isnan(rY)) && i_pt < iN) {
#undef isnan
+ foundNan = true;
c->point(++i_pt, rX, rY);
}
@ -4847,4 +4853,5 @ void Kst2DPlot::plotCurves(QPainter& p,
last_y1 = Y1;
+ if (!foundNan) {
if (floor(X1) == floor(X2)) {
if (overlap) {
@ -5005,4 +5012,5 @ void Kst2DPlot::plotCurves(QPainter& p,
}
} // end if (X1 == X2)
+ } // end if (!foundNan)
} // end if (i_pt <= iN)
} // end while
More information about the Kst
mailing list