[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Sat Dec 11 02:32:56 CET 2004


CVS commit by arwalker: 

Use clip regions to keep symbols within the plot.


  M +10 -0     kst2dplot.cpp   1.312


--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.311:1.312
@@ -5065,4 +5065,6 @@ void Kst2DPlot::plotCurves(QPainter& p,
                            double m_X, double m_Y, double b_X, double b_Y, int penWidth) {
   KstBaseCurvePtr c;
+  QRegion clipRegion;
+  QRect clipRect;
   double maxY = 0.0, minY = 0.0;
   double rX, rY, rEX, rEY;
@@ -5071,6 +5073,11 @@ void Kst2DPlot::plotCurves(QPainter& p,
   double last_x1, last_y1;
   bool overlap;
+  bool clipping;
   int i_pt;
 
+  clipRegion = p.clipRegion();
+  clipping = p.hasClipping();
+  p.setClipRegion(QRegion(GetPlotRegion(), QRegion::Rectangle));
+
   for (int i_curve = 0; i_curve < (int)Curves.count(); i_curve++) {
     c = Curves[i_curve];
@@ -5625,4 +5632,7 @@ void Kst2DPlot::plotCurves(QPainter& p,
     c->readUnlock();
   } // next curve
+
+  p.setClipRegion(clipRegion);
+  p.setClipping(clipping);
 }
 





More information about the Kst mailing list