| 312 | } |
| 313 | |
| 314 | m2::SharedSpline SimplifySpline(m2::SharedSpline const & in, double minSqrLength) |
| 315 | { |
| 316 | m2::SharedSpline spline; |
| 317 | spline.Reset(new m2::Spline(in->GetSize())); |
| 318 | |
| 319 | m2::PointD lastAddedPoint; |
| 320 | for (auto const & point : in->GetPath()) |
| 321 | { |
| 322 | if (spline->GetSize() > 1 && point.SquaredLength(lastAddedPoint) < minSqrLength) |
| 323 | { |
| 324 | spline->ReplacePoint(point); |
| 325 | } |
| 326 | else |
| 327 | { |
| 328 | spline->AddPoint(point); |
| 329 | lastAddedPoint = point; |
| 330 | } |
| 331 | } |
| 332 | return spline; |
| 333 | } |
| 334 | |
| 335 | std::string GetBackgroundSymbolName(std::string const & symbolName) |
| 336 | { |
no test coverage detected