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

Function drawSketchLine

QtNodeEditor/src/ConnectionPainter.cpp:100–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98#endif
99
100static
101void
102drawSketchLine(QPainter * painter,
103 Connection const & connection)
104{
105 using QtNodes::ConnectionState;
106
107 ConnectionState const& state =
108 connection.connectionState();
109
110 if (state.requiresPort())
111 {
112 auto const & connectionStyle = connection.style();
113
114 QPen p;
115 p.setWidth(connectionStyle.constructionLineWidth());
116 p.setColor(connectionStyle.constructionColor());
117 p.setStyle(Qt::DashLine);
118
119 painter->setPen(p);
120 painter->setBrush(Qt::NoBrush);
121
122 using QtNodes::ConnectionGeometry;
123 ConnectionGeometry const& geom = connection.connectionGeometry();
124
125 auto cubic = cubicPath(geom);
126 // cubic spline
127 painter->drawPath(cubic);
128 }
129}
130
131static
132void

Callers 1

paintMethod · 0.85

Calls 2

cubicPathFunction · 0.85
requiresPortMethod · 0.80

Tested by

no test coverage detected