diff options
Diffstat (limited to 'qtmips_gui/coreview/multiplexer.cpp')
-rw-r--r-- | qtmips_gui/coreview/multiplexer.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/qtmips_gui/coreview/multiplexer.cpp b/qtmips_gui/coreview/multiplexer.cpp index 57fa443..148c58d 100644 --- a/qtmips_gui/coreview/multiplexer.cpp +++ b/qtmips_gui/coreview/multiplexer.cpp @@ -33,15 +33,16 @@ QRectF Multiplexer::boundingRect() const { } void Multiplexer::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { - // Draw pointing line first so it isn't over the border lines + const QPointF poly[] = { + QPointF(0, 0), + QPointF(WIDTH, WIDTH), + QPointF(WIDTH, (HEIGHT * size) - WIDTH), + QPointF(0, HEIGHT * size) + }; + painter->drawPolygon(poly, sizeof(poly) / sizeof(QPointF)); + painter->setPen(QColor(200, 200, 200)); painter->drawLine(0, (HEIGHT / 2) + (seton * HEIGHT), WIDTH, (HEIGHT * size) / 2); - - painter->setPen(QColor()); - painter->drawLine(0, 0, 0, (HEIGHT * size)); // (|) - painter->drawLine(0, 0, WIDTH, WIDTH); // (\) - painter->drawLine(0, (HEIGHT * size), WIDTH, (HEIGHT * size) - WIDTH); // (/) - painter->drawLine(WIDTH, WIDTH, WIDTH, (HEIGHT * size) - WIDTH); // (|) } void Multiplexer::setPos(qreal x, qreal y) { |