[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Wed Dec 15 17:34:51 CET 2004


CVS commit by staikos: 

- move the label timer to the right place to avoid a crash
- add finer grained curve plot timer (more to come)


  M +13 -3     kst2dplot.cpp   1.324


--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.323:1.324
@@ -2177,9 +2177,9 @@ void Kst2DPlot::draw(QPainter &p, KstPai
       label->draw(p, d2i(xleft_bdr_px + double(RelPlotRegion.width()) * label->x()),
                   d2i(ytop_bdr_px + double(RelPlotRegion.height()) * label->y()));
+    }
 #ifdef PLOTBENCH
-      bt_label[i_bt] = "plot Legend";
+      bt_label[i_bt] = "plot arbitrary Labels";
       bt[i_bt++] = bench_time.elapsed();
 #endif    
-    }
 
     p.flush();
@@ -5142,5 +5142,11 @@ void Kst2DPlot::plotCurves(QPainter& p,
   p.setClipRect((int)Lx, (int)Ly, (int)(Hx-Lx), (int)(Hy-Ly), QPainter::CoordPainter);
   
+#ifdef PLOTBENCH
+  QTime bench_time;
+#endif
   for (int i_curve = 0; i_curve < (int)Curves.count(); i_curve++) {
+#ifdef PLOTBENCH
+    bench_time.start();
+#endif
     c = Curves[i_curve];
     c->readLock();
@@ -5696,4 +5702,8 @@ void Kst2DPlot::plotCurves(QPainter& p,
     } // end if (c->sampleCount() > 0)
     c->readUnlock();
+#ifdef PLOTBENCH
+    int i = bench_time.elapsed();
+    printf("Plotting curve %d: %ims\n", i_curve, i);
+#endif
   } // next curve
 





More information about the Kst mailing list