| 498 | |
| 499 | #ifdef DRAW_TILE_NET |
| 500 | void RuleDrawer::DrawTileNet() |
| 501 | { |
| 502 | if (CheckCancelled()) |
| 503 | return; |
| 504 | |
| 505 | auto const key = m_context->GetTileKey(); |
| 506 | |
| 507 | std::vector<m2::PointD> path; |
| 508 | path.reserve(4); |
| 509 | path.push_back(m_globalRect.LeftBottom()); |
| 510 | path.push_back(m_globalRect.LeftTop()); |
| 511 | path.push_back(m_globalRect.RightTop()); |
| 512 | path.push_back(m_globalRect.RightBottom()); |
| 513 | |
| 514 | m2::SharedSpline spline(path); |
| 515 | df::LineViewParams p; |
| 516 | p.m_tileCenter = m_globalRect.Center(); |
| 517 | p.m_baseGtoPScale = 1.0; |
| 518 | p.m_cap = dp::ButtCap; |
| 519 | p.m_color = dp::Color::Blue(); |
| 520 | p.m_depth = dp::kMaxDepth; |
| 521 | p.m_depthLayer = DepthLayer::GeometryLayer; |
| 522 | p.m_width = 1; |
| 523 | p.m_join = dp::RoundJoin; |
| 524 | |
| 525 | auto lineShape = make_unique_dp<LineShape>(spline, p); |
| 526 | lineShape->Prepare(m_context->GetTextureManager()); |
| 527 | TMapShapes shapes; |
| 528 | shapes.push_back(std::move(lineShape)); |
| 529 | m_context->Flush(std::move(shapes)); |
| 530 | |
| 531 | df::TextViewParams tp; |
| 532 | tp.m_markId = kml::kDebugMarkId; |
| 533 | tp.m_tileCenter = m_globalRect.Center(); |
| 534 | tp.m_titleDecl.m_anchor = dp::Center; |
| 535 | tp.m_depth = dp::kMaxDepth; |
| 536 | tp.m_depthLayer = DepthLayer::OverlayLayer; |
| 537 | tp.m_titleDecl.m_primaryText = key.Coord2String(); |
| 538 | |
| 539 | tp.m_titleDecl.m_primaryTextFont = dp::FontDecl(dp::Color::Red(), 30); |
| 540 | tp.m_titleDecl.m_primaryOffset = {0.0f, 0.0f}; |
| 541 | auto textShape = |
| 542 | make_unique_dp<TextShape>(m_globalRect.Center(), tp, key, m2::PointF(0.0f, 0.0f) /* symbolSize */, |
| 543 | m2::PointF(0.0f, 0.0f) /* symbolOffset */, dp::Anchor::Center, 0 /* textIndex */); |
| 544 | textShape->DisableDisplacing(); |
| 545 | |
| 546 | textShape->Prepare(m_context->GetTextureManager()); |
| 547 | TMapShapes overlayShapes; |
| 548 | overlayShapes.push_back(std::move(textShape)); |
| 549 | m_context->FlushOverlays(std::move(overlayShapes)); |
| 550 | } |
| 551 | #endif |
| 552 | } // namespace df |
no test coverage detected