git-svn-id: svn://db.shs.com.ru/libs@78 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2016-02-10 08:14:16 +00:00
parent 17e8387d9d
commit 550947ab97

View File

@@ -550,10 +550,19 @@ void BlockBusItem::paint(QPainter * p, const QStyleOptionGraphicsItem * o, QWidg
QTransform tf;
tf.translate(sp.x(), sp.y());
tf.rotate(-QLineF(sp, ep).angle());
tf.translate(0., im_bus.height() / 2.);
tf.translate(0., -im_bus.height() / 2.);
/*
br.setTransform(tf);
p->setPen(QPen(br, im_bus.height(), Qt::SolidLine, Qt::FlatCap, Qt::BevelJoin));
p->drawLine(sp, ep);
*/
p->save();
p->setTransform(tf, true);
p->setPen(Qt::NoPen);
p->setBrush(br);
//p->drawLine(QPointF(0., 0.), QPointF(QLineF(sp, ep).length(), 0.));
p->drawRect(QRectF(0., 0., QLineF(sp, ep).length(), im_bus.height()));
p->restore();
}
}
if (!im_end.isNull()) {