[Kst] kdeextragear-2/kst/kst

Barth Netterfield netterfield at astro.utoronto.ca
Tue Dec 14 06:16:34 CET 2004


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 {





More information about the Kst mailing list