Summary: | invisible curves when width != 0 or type != solid | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Nicolas Brisset <nicolas.brisset> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | testcase for a non-steady curve |
Description
Nicolas Brisset
2004-12-12 22:16:42 UTC
Created attachment 8642 [details]
testcase for a non-steady curve
It seems that after changing the curve properties the curve is not updated. If you resize the window the plot is in then the curve correctly updates and all appears well. Resizing does not change anything here on those curves where the problem happens. By the way, it seems to always happen when variations are small or null (i.e. in those parts corresponding to more or less steady values). I hope that's a hint ? CVS commit by netterfield: BUG: 95020 when more than one data point lies in a pixel, a vertical line is drawn in that pixel, from the min to max point in the pixel. If ymin==ymax, then the line is of zero length. With linewidth!=0, a 0 length line draws nothing. Hence, no line. This adds linewidth to the length of the vertical line - so something always gets drawn. M +8 -3 kst2dplot.cpp 1.319 --- kdeextragear-2/kst/kst/kst2dplot.cpp #1.318:1.319 @@ -5093,7 +5093,10 @@ void Kst2DPlot::plotCurves(QPainter& p, int index = 0; int i0Start = i0; + double lw; + + lw = (c->lineWidth() < penWidth ? penWidth : c->lineWidth()); p.setPen(QPen(c->color(), - (c->lineWidth() < penWidth ? penWidth : c->lineWidth()), + int(lw), style)); @@ -5183,4 +5186,6 @@ void Kst2DPlot::plotCurves(QPainter& p, if (maxY <= Hy && minY >= Ly) { if (style == Qt::SolidLine) { + minY-=lw/1.99999; + maxY+=lw/1.99999; p.drawLine(d2i(X2), d2i(minY), d2i(X2), d2i(maxY)); } else { |