| 551 | } |
| 552 | |
| 553 | SpeedCameraMark::SpeedCameraMark(m2::PointD const & ptOrg) : UserMark(ptOrg, Type::SPEED_CAM) |
| 554 | { |
| 555 | auto const vs = static_cast<float>(df::VisualParams::Instance().GetVisualScale()); |
| 556 | |
| 557 | m_titleDecl.m_primaryTextFont.m_color = df::GetColorConstant(kSpeedCameraMarkText); |
| 558 | m_titleDecl.m_primaryTextFont.m_size = kSpeedCameraMarkTextSize; |
| 559 | m_titleDecl.m_primaryOffset.x = kSpeedCameraOutlineWidth + kSpeedCameraMarkTextMargin; |
| 560 | m_titleDecl.m_anchor = dp::Left; |
| 561 | |
| 562 | m_symbolNames.insert(std::make_pair(kMinSpeedCameraZoom, "speedcam-alert-l")); |
| 563 | |
| 564 | df::ColoredSymbolViewParams params; |
| 565 | params.m_color = df::GetColorConstant(kSpeedCameraMarkBg); |
| 566 | params.m_anchor = dp::Left; |
| 567 | params.m_shape = df::ColoredSymbolViewParams::Shape::RoundedRectangle; |
| 568 | params.m_radiusInPixels = kSpeedCameraRadius * vs; |
| 569 | auto const minSize = 2.0f * (kSpeedCameraOutlineWidth + kSpeedCameraMarkTextMargin); |
| 570 | params.m_sizeInPixels = m2::PointF(minSize, minSize) * vs; |
| 571 | params.m_outlineColor = df::GetColorConstant(kSpeedCameraMarkOutline); |
| 572 | params.m_outlineWidth = kSpeedCameraOutlineWidth; |
| 573 | m_textBg.m_zoomInfo[kMinSpeedCameraTitleZoom] = params; |
| 574 | m_textBg.m_addTextSize = true; |
| 575 | } |
| 576 | |
| 577 | void SpeedCameraMark::SetTitle(std::string const & title) |
| 578 | { |
nothing calls this directly
no test coverage detected