MCPcopy Create free account
hub / github.com/MyGUI/mygui / updateCanvasImpl

Method updateCanvasImpl

UnitTests/UnitTest_GraphView/BaseGraphView.h:385–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383 }
384
385 void updateCanvasImpl()
386 {
387 clearCanvas();
388
389 // проходим по всем нодам и перерисовываем связи
390 for (auto& mNode : mNodes)
391 {
392 EnumeratorConnection node_point = mNode->getConnectionEnumerator();
393 while (node_point.next())
394 {
395 const MyGUI::IntCoord& coord_from = node_point->getAbsoluteCoord();
396 EnumeratorConnection connect_point = node_point->getConnectionEnumerator();
397 while (connect_point.next())
398 {
399 const MyGUI::IntCoord& coord_to = connect_point->getAbsoluteCoord();
400
401 ConnectionInfo info(
402 coord_from.point() - mCanvas->getAbsolutePosition() +
403 MyGUI::IntPoint(coord_from.width / 2, coord_from.height / 2),
404 coord_to.point() - mCanvas->getAbsolutePosition() +
405 MyGUI::IntPoint(coord_to.width / 2, coord_to.height / 2),
406 MyGUI::Colour::White,
407 node_point->getOffset(),
408 connect_point->getOffset());
409
410 drawCurve(info);
411 }
412 }
413 }
414
415 // ниточка для драга
416 if (mIsDrug)
417 drawCurve(mDrugLine);
418 }
419
420 void connectPoint(BaseGraphConnection* _connection)
421 {

Callers

nothing calls this directly

Calls 6

getAbsoluteCoordMethod · 0.80
getOffsetMethod · 0.80
IntPointFunction · 0.50
nextMethod · 0.45
pointMethod · 0.45

Tested by

no test coverage detected