[Kst] branches/work/kst/portto4/kst/src

Barth Netterfield netterfield at astro.utoronto.ca
Wed Jan 25 22:24:49 UTC 2012


SVN commit 1275906 by netterfield:

Update apply in settings dialog.
Shorter polylines.


 M  +2 -0      libkstapp/generaltab.cpp  
 M  +1 -0      libkstapp/plotitem.cpp  
 M  +0 -1      libkstapp/viewitem.cpp  
 M  +1 -1      libkstapp/viewitem.h  
 M  +9 -1      libkstmath/curve.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/generaltab.cpp #1275905:1275906
@@ -23,6 +23,8 @@
 
   connect(_useOpenGL, SIGNAL(stateChanged(int)), this, SIGNAL(modified()));
   connect(_maxUpdate, SIGNAL(valueChanged(int)), this, SIGNAL(modified()));
+  connect(_transparentDrag, SIGNAL(stateChanged(int)), this, SIGNAL(modified()));
+  connect(_antialiasPlots, SIGNAL(stateChanged(int)), this, SIGNAL(modified()));
 }
 
 
--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.cpp #1275905:1275906
@@ -926,6 +926,7 @@
 void PlotItem::paintPixmap(QPainter *painter) {
   if ((view()->plotBordersDirty() || (creationState() == ViewItem::InProgress)) && rect().isValid()) {
     ViewGridLayout::standardizePlotMargins(this, painter);
+    // this might be a good place to update child view items locked to data rather than window.
     setPlotBordersDirty(false);
   }
 
--- branches/work/kst/portto4/kst/src/libkstapp/viewitem.cpp #1275905:1275906
@@ -1776,7 +1776,6 @@
 #endif
 
   QRectF itemRect = rect();
-
   //Lock aspect ratio for rotating objects or children with a lockedAspectRatio
   //FIXME is the child rotated with respect to the parent is the real question...
   if (transform().isRotating() || lockAspectRatio()) {
--- branches/work/kst/portto4/kst/src/libkstapp/viewitem.h #1275905:1275906
@@ -320,7 +320,7 @@
     void updateView();
 
   protected:
-  public: // TODO why does View need it?
+  public:
     virtual void updateChildGeometry(const QRectF &oldParentRect, const QRectF &newParentRect);
   protected:
     virtual QString _automaticDescriptiveName() const;
--- branches/work/kst/portto4/kst/src/libkstmath/curve.cpp #1275905:1275906
@@ -53,7 +53,7 @@
 #endif
 
 // for painting
-#define MAX_NUM_POLYLINES       1000
+#define MAX_NUM_POLYLINES       10
 
 namespace Kst {
 
@@ -666,6 +666,11 @@
 
 
 void Curve::paintObjects(const CurveRenderContext& context) {
+#ifdef BENCHMARK
+  QTime bench_time;
+  bench_time.start();
+#endif
+
   QPainter *p = context.painter;
   p->save();
 
@@ -700,6 +705,9 @@
     CurvePointSymbol::draw(HeadType, p, _head.x(), _head.y(), _width);
   }
   p->restore();
+#ifdef BENCHMARK
+  std::cout << "curve drawing:" << bench_time.elapsed() << "ms\n";
+#endif
 }
 
 


More information about the Kst mailing list