| 613 | } |
| 614 | |
| 615 | void MyPositionController::Render(ref_ptr<dp::GraphicsContext> context, ref_ptr<gpu::ProgramManager> mng, |
| 616 | ScreenBase const & screen, int zoomLevel, FrameValues const & frameValues) |
| 617 | { |
| 618 | CheckNotFollowRouting(); |
| 619 | |
| 620 | if (m_shape != nullptr && IsModeHasPosition()) |
| 621 | { |
| 622 | CheckBlockAutoZoom(); |
| 623 | CheckUpdateLocation(); |
| 624 | |
| 625 | if ((m_isDirtyViewport || m_isDirtyAutoZoom) && !m_needBlockAnimation) |
| 626 | { |
| 627 | if (!UpdateViewportWithAutoZoom() && m_isDirtyViewport) |
| 628 | UpdateViewport(kDoNotChangeZoom); |
| 629 | m_isDirtyViewport = false; |
| 630 | m_isDirtyAutoZoom = false; |
| 631 | } |
| 632 | |
| 633 | if (!IsModeChangeViewport()) |
| 634 | m_isPendingAnimation = false; |
| 635 | |
| 636 | /// @todo Put under !m_hints.m_screenshotMode? |
| 637 | /// Why do we have 6 modifiers (and 6 variables inside), if better to make 1 function m_shape->Render(Params)? |
| 638 | m_shape->SetPositionObsolete(m_positionIsObsolete); |
| 639 | m_shape->SetPosition(m2::PointF(GetDrawablePosition())); |
| 640 | m_shape->SetAzimuth(static_cast<float>(GetDrawableAzimut())); |
| 641 | m_shape->SetIsValidAzimuth(IsRotationAvailable()); |
| 642 | m_shape->SetAccuracy(static_cast<float>(m_errorRadius)); |
| 643 | m_shape->SetRoutingMode(IsInRouting()); |
| 644 | |
| 645 | if (!m_hints.m_screenshotMode) |
| 646 | { |
| 647 | m_shape->RenderAccuracy(context, mng, screen, zoomLevel, frameValues); |
| 648 | m_shape->RenderMyPosition(context, mng, screen, zoomLevel, frameValues); |
| 649 | } |
| 650 | } |
| 651 | } |
| 652 | |
| 653 | bool MyPositionController::IsRouteFollowingActive() const |
| 654 | { |
nothing calls this directly
no test coverage detected