[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Fri Jul 16 21:06:53 CEST 2004


CVS commit by staikos: 

microoptimizations for functions that get called with high frequency in
realtime mode


  M +4 -10     kst2dplot.cpp   1.153


--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.152:1.153
@@ -902,7 +902,5 @@ void Kst2DPlot::updateTieBox(QPainter& p
   p.drawRect(tr);
   if (_hasFocus) {
-    QSize sz = tr.size();
-    sz /= 2;
-    tr.setSize(sz);
+    tr.setSize(tr.size() / 2);
     tr.moveTopLeft(tr.topLeft() + QPoint(3*tr.width()/4, 3*tr.height()/4));
     p.fillRect(tr, foregroundColor());
@@ -918,9 +916,5 @@ void Kst2DPlot::paint(KstPaintType type,
       draw(p, 5.0, true);
     } else {
-      if (type == P_EXPORT) {
-        draw(p, 1.0, true);
-      } else {
-        draw(p, 1.0, false);
-      }
+      draw(p, 1.0, type == P_EXPORT);
     }
     p.setWindow(window_hold);
@@ -979,8 +973,8 @@ void Kst2DPlot::draw() {
 }
 
-void Kst2DPlot::draw(QPainter &p, double resolutionEnhancement, bool bForceDraw) {
+void Kst2DPlot::draw(QPainter &p, double resolutionEnhancement, bool forceDraw) {
   /* Draws to the buffer */
 
-  if (_zoomPaused && !bForceDraw) {
+  if (_zoomPaused && !forceDraw) {
     return;
   }





More information about the Kst mailing list