| 60 | |
| 61 | #ifdef NODE_DEBUG_DRAWING |
| 62 | static |
| 63 | void |
| 64 | debugDrawing(QPainter * painter, |
| 65 | Connection const & connection) |
| 66 | { |
| 67 | Q_UNUSED(painter); |
| 68 | Q_UNUSED(connection); |
| 69 | ConnectionGeometry const& geom = |
| 70 | connection.connectionGeometry(); |
| 71 | |
| 72 | { |
| 73 | QPointF const& source = geom.source(); |
| 74 | QPointF const& sink = geom.sink(); |
| 75 | |
| 76 | auto points = geom.pointsC1C2(); |
| 77 | |
| 78 | painter->setPen(Qt::red); |
| 79 | painter->setBrush(Qt::red); |
| 80 | |
| 81 | painter->drawLine(QLineF(source, points.first)); |
| 82 | painter->drawLine(QLineF(points.first, points.second)); |
| 83 | painter->drawLine(QLineF(points.second, sink)); |
| 84 | painter->drawEllipse(points.first, 3, 3); |
| 85 | painter->drawEllipse(points.second, 3, 3); |
| 86 | |
| 87 | painter->setBrush(Qt::NoBrush); |
| 88 | |
| 89 | painter->drawPath(cubicPath(geom)); |
| 90 | } |
| 91 | |
| 92 | { |
| 93 | painter->setPen(Qt::yellow); |
| 94 | |
| 95 | painter->drawRect(geom.boundingRect()); |
| 96 | } |
| 97 | } |
| 98 | #endif |
| 99 | |
| 100 | static |