MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / debugDrawing

Function debugDrawing

QtNodeEditor/src/ConnectionPainter.cpp:62–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60
61#ifdef NODE_DEBUG_DRAWING
62static
63void
64debugDrawing(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
100static

Callers 1

paintMethod · 0.85

Calls 3

cubicPathFunction · 0.85
sourceMethod · 0.80
sinkMethod · 0.80

Tested by

no test coverage detected