[Kst] kdeextragear-2/kst/kst

Barth Netterfield netterfield at astro.utoronto.ca
Tue Dec 14 16:37:35 CET 2004


CVS commit by netterfield: 

BUG:
Fix drawing bug for other line types....
Fill the poly-line before drawing it to preserve line type.
If Ymin==Ymax in a pixel, only insert 1 point into the poly line.


  M +5 -2      kst2dplot.cpp   1.320


--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.319:1.320
@@ -5190,5 +5190,6 @@ void Kst2DPlot::plotCurves(QPainter& p,
                         p.drawLine(d2i(X2), d2i(minY), d2i(X2), d2i(maxY));
                       } else {
-                        if (lastPlottedX != d2i(X2) || index >= MAX_NUM_POLYLINES-2) {
+                        //if (lastPlottedX != d2i(X2) || index >= MAX_NUM_POLYLINES-2) {
+                        if (index >= MAX_NUM_POLYLINES-2) {
                           if (index > 1) {
                             p.drawPolyline(points, 0, index);
@@ -5196,5 +5197,7 @@ void Kst2DPlot::plotCurves(QPainter& p,
                           index = 0;
                         }
-                        if (Y2 == minY) {
+                        if (d2i(minY) == d2i(maxY)) {
+                          points.setPoint(index++, d2i(X2), d2i(maxY));                   
+                        } else if (Y2 == minY) {
                           points.setPoint(index++, d2i(X2), d2i(maxY));
                           points.setPoint(index++, d2i(X2), d2i(minY));





More information about the Kst mailing list