[Kst] branches/work/kst/viewpaint/kst/kst
George Staikos
staikos at kde.org
Sun Jan 29 18:55:01 CET 2006
SVN commit 503616 by staikos:
make borders print
M +9 -7 kstborderedviewobject.cpp
M +2 -2 kstviewlabel.cpp
--- branches/work/kst/viewpaint/kst/kst/kstborderedviewobject.cpp #503615:503616
@@ -72,13 +72,15 @@
void KstBorderedViewObject::paintSelf(KstPainter& p, const QRegion& bounds) {
p.save();
- if (p.makingMask()) {
- p.setRasterOp(Qt::SetROP);
- KstViewObject::paintSelf(p, bounds);
- } else {
- const QRegion clip(clipRegion());
- KstViewObject::paintSelf(p, bounds - clip);
- p.setClipRegion(bounds & clip);
+ if (p.type() != KstPainter::P_PRINT && p.type() != KstPainter::P_EXPORT) {
+ if (p.makingMask()) {
+ p.setRasterOp(Qt::SetROP);
+ KstViewObject::paintSelf(p, bounds);
+ } else {
+ const QRegion clip(clipRegion());
+ KstViewObject::paintSelf(p, bounds - clip);
+ p.setClipRegion(bounds & clip);
+ }
}
if (_borderWidth > 0) {
QRect r;
--- branches/work/kst/viewpaint/kst/kst/kstviewlabel.cpp #503615:503616
@@ -338,13 +338,13 @@
void KstViewLabel::paintSelf(KstPainter& p, const QRegion& bounds) {
p.save();
if (p.type() == KstPainter::P_PRINT || p.type() == KstPainter::P_EXPORT) {
- KstBorderedViewObject::paintSelf(p, bounds);
if (_autoResize) {
adjustSizeForText(p.window());
} else {
computeTextSize(_parsed);
}
- const QRect geom(geometry());
+ KstBorderedViewObject::paintSelf(p, bounds);
+ const QRect geom(contentsRect());
p.setViewport(geom);
p.setWindow(0, 0, geom.width(), geom.height());
More information about the Kst
mailing list