| 59 | } |
| 60 | |
| 61 | void VisualizeFeatureInRect(m2::RectD const & rect, FeatureType & ft, df::DrapeApi & drapeApi) |
| 62 | { |
| 63 | bool allPointsOutside = true; |
| 64 | std::vector<m2::PointD> points; |
| 65 | ft.ForEachPoint([&](m2::PointD const & pt) |
| 66 | { |
| 67 | if (rect.IsPointInside(pt)) |
| 68 | allPointsOutside = false; |
| 69 | points.push_back(pt); |
| 70 | }, scales::GetUpperScale()); |
| 71 | |
| 72 | if (!allPointsOutside) |
| 73 | { |
| 74 | static uint64_t counter = 0; |
| 75 | auto const color = colorList[counter++ % std::size(colorList)]; |
| 76 | |
| 77 | // Note. The first param at DrapeApi::AddLine() should be unique, so pass unique ft.GetID(). |
| 78 | // Other way last added line replaces the previous added line with the same name. |
| 79 | drapeApi.AddLine(DebugPrint(ft.GetID()), df::DrapeApiLineData(points, color).Width(3.0f).ShowPoints(true).ShowId()); |
| 80 | } |
| 81 | } |
| 82 | } // namespace |
| 83 | |
| 84 | void Framework::VisualizeRoadsInRect(m2::RectD const & rect) |
no test coverage detected