const double scale = option->matrix.m11();
-
//painter->setRenderHints(QPainter::Antialiasing);
//QPainterPath roundRectPathUpper = upperRectPart(br), roundRectPathLower = lowerRectPart(br);
//kDebug()<<"/// ITEM PAINTING:: exposed="<<exposed<<", RECT = "<<rect();
- exposed.setRight(exposed.right() + 1);
+ // expand clip rect to allow correct painting of clip border
+ exposed.setRight(exposed.right() + 1 / scale + 0.5);
exposed.setBottom(exposed.bottom() + 1);
painter->setClipRect(exposed);
- //painter->setClipping(false);
- //painter->fillRect(exposed, Qt::blue);
painter->setPen(pen);
painter->drawRect(br);
}
void Transition::paint(QPainter *painter,
const QStyleOptionGraphicsItem *option,
QWidget *widget) {
+ const double scale = option->matrix.m11();
QRectF exposed = option->exposedRect;
- exposed.setRight(exposed.right() + 1);
- exposed.setBottom(exposed.bottom() + 1);
painter->setClipRect(exposed);
QRectF br = rect();
m_gradient.setStart(0, br.y());
pen.setColor(Qt::black);
//pen.setWidth(1);
}
+ // expand clip rect to allow correct painting of clip border
+ exposed.setRight(exposed.right() + 1 / scale + 0.5);
+ exposed.setBottom(exposed.bottom() + 1);
+ painter->setClipRect(exposed);
painter->setPen(pen);
painter->drawRect(br);
}