[Kst] extragear/graphics/kst/kst

Andrew Walker arwalker at sumusltd.com
Wed Dec 14 23:50:44 CET 2005


SVN commit 488561 by arwalker:

CCBUG:118148 Fix up some more problems

 M  +2 -0      kstviewarrow.cpp  
 M  +2 -1      kstviewbox.cpp  
 M  +2 -1      kstviewellipse.cpp  
 M  +3 -3      kstviewline.cpp  
 M  +2 -0      kstviewpicture.cpp  


--- trunk/extragear/graphics/kst/kst/kstviewarrow.cpp #488560:488561
@@ -77,6 +77,7 @@
 
 
 void KstViewArrow::paint(KstPainter& p, const QRegion& bounds) {
+  p.save();
   if (p.makingMask()) {
     p.setRasterOp(Qt::SetROP);
   }
@@ -158,6 +159,7 @@
     }
   }
   KstViewLine::paint(p, bounds);
+  p.restore();
 }
 
 
--- trunk/extragear/graphics/kst/kst/kstviewbox.cpp #488560:488561
@@ -68,6 +68,7 @@
 
 
 void KstViewBox::paint(KstPainter& p, const QRegion& bounds) {
+  p.save();
   if (p.makingMask()) {
     p.setRasterOp(Qt::SetROP);
     KstViewObject::paint(p, bounds);
@@ -100,7 +101,7 @@
   r.setHeight(_geom.height() - borderWidth());
 
   p.drawRoundRect(r, _xRound, _yRound);
-  p.setClipping(false); 
+  p.restore();
 }
 
 
--- trunk/extragear/graphics/kst/kst/kstviewellipse.cpp #488560:488561
@@ -59,6 +59,7 @@
 
 
 void KstViewEllipse::paint(KstPainter& p, const QRegion& bounds) {
+  p.save();
   if (p.makingMask()) {
     p.setRasterOp(Qt::SetROP);
     KstViewObject::paint(p, bounds);
@@ -83,7 +84,7 @@
   //p.drawEllipse(geometry());
   p.drawEllipse(geometry().x() + _borderWidth/2, geometry().y() + _borderWidth/2,
          geometry().width() - _borderWidth, geometry().height() - _borderWidth);
-  p.setClipping(false); 
+  p.restore();
 }
 
 
--- trunk/extragear/graphics/kst/kst/kstviewline.cpp #488560:488561
@@ -57,6 +57,7 @@
 
 
 void KstViewLine::paint(KstPainter& p, const QRegion& bounds) {
+  p.save();
   if (p.makingMask()) {
     p.setRasterOp(Qt::SetROP);
   }
@@ -64,7 +65,6 @@
   QPen pen(_foregroundColor, _width);
   pen.setCapStyle(_capStyle);
   pen.setStyle(_penStyle);
-  const QPen oldPen(p.pen());
   p.setPen(pen);
 
   const QRect geom(geometry());
@@ -95,8 +95,8 @@
       break;
   }
   // paint this last
-  p.setPen(oldPen);
-  KstViewObject::paint(p, bounds); 
+  KstViewObject::paint(p, bounds);
+  p.restore();
 }
 
 
--- trunk/extragear/graphics/kst/kst/kstviewpicture.cpp #488560:488561
@@ -68,6 +68,7 @@
 
 
 void KstViewPicture::paint(KstPainter& p, const QRegion& bounds) {
+  p.save();
   if (p.makingMask()) {
     p.setRasterOp(Qt::SetROP);
     KstBorderedViewObject::paint(p, bounds);
@@ -118,6 +119,7 @@
       }
     }
   }
+  p.restore();
 }
 
 


More information about the Kst mailing list