* TODO * EXPERIMENTAL, draw an area around selected pins */
| 3140 | * EXPERIMENTAL, draw an area around selected pins |
| 3141 | */ |
| 3142 | void BoardView::DrawSelectedPins(ImDrawList *draw) { |
| 3143 | std::vector<ImVec2> pl; |
| 3144 | if ((m_pinHighlighted.size()) < 3) return; |
| 3145 | for (auto &p : m_pinHighlighted) { |
| 3146 | pl.push_back(CoordToScreen(p->position.x, p->position.y)); |
| 3147 | } |
| 3148 | std::vector<ImVec2> hull = VHConvexHull(pl); |
| 3149 | if (hull.size() > 3) { |
| 3150 | draw->AddConvexPolyFilled(hull.data(), hull.size(), 0x660000ff); |
| 3151 | } |
| 3152 | } |
| 3153 | |
| 3154 | void BoardView::DrawBoard() { |
| 3155 | if (!m_file || !m_board) return; |
nothing calls this directly
no test coverage detected