[Kst] [Bug 95020] invisible curves when width != 0 or type != solid

netterfield at astro.utoronto.ca netterfield at astro.utoronto.ca
Tue Dec 14 06:16:43 CET 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=95020        
netterfield astro utoronto ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From netterfield astro utoronto ca  2004-12-14 06:16 -------
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