[Kst] branches/work/kst/viewpaint/kst/kst
George Staikos
staikos at kde.org
Sun Jan 29 22:03:44 CET 2006
SVN commit 503669 by staikos:
fix transparency of pictures
M +3 -3 kstviewobject.cpp
M +7 -1 kstviewpicture.cpp
M +1 -0 kstviewpicture.h
--- branches/work/kst/viewpaint/kst/kst/kstviewobject.cpp #503668:503669
@@ -263,7 +263,7 @@
aspect = _aspect;
}
- if (_transparent) {
+ if (transparent()) {
ts << indent << "<transparent/>" << endl;
}
ts << indent << "<tag>" << QStyleSheet::escape(tagName()) << "</tag>" << endl;
@@ -396,7 +396,7 @@
if (!bounds.isNull()) {
p.setClipRegion(bounds);
}
- if (!_transparent) {
+ if (!transparent()) {
p.fillRect(geometry(), _backgroundColor);
}
}
@@ -1616,7 +1616,7 @@
QRegion KstViewObject::clipRegion() {
if (_clipMask.isNull()) {
- if (_transparent) {
+ if (transparent()) {
QBitmap bm(_geom.bottomRight().x(), _geom.bottomRight().y(), true);
if (!bm.isNull()) {
KstPainter p;
--- branches/work/kst/viewpaint/kst/kst/kstviewpicture.cpp #503668:503669
@@ -103,7 +103,7 @@
p.save();
if (p.type() != KstPainter::P_PRINT && p.type() != KstPainter::P_EXPORT) {
if (p.makingMask()) {
- p.setRasterOp(Qt::SetROP);
+ p.setRasterOp(Qt::OrROP);
} else {
const QRegion clip(clipRegion());
KstBorderedViewObject::paintSelf(p, bounds - _myClipMask);
@@ -250,6 +250,12 @@
}
+bool KstViewPicture::transparent() const {
+ kstdDebug() << "transparent? " << _iCache.hasAlphaBuffer() << endl;
+ return _iCache.hasAlphaBuffer();
+}
+
+
int KstViewPicture::refreshTimer() const {
return _refresh;
}
--- branches/work/kst/viewpaint/kst/kst/kstviewpicture.h #503668:503669
@@ -52,6 +52,7 @@
QRegion clipRegion();
void paintSelf(KstPainter& p, const QRegion& bounds);
+ bool transparent() const;
protected slots:
void doRefresh();
More information about the Kst
mailing list