MCPcopy Create free account
hub / github.com/comaps/comaps / Render

Method Render

libs/drape_frontend/my_position_controller.cpp:615–651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

613}
614
615void 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
653bool MyPositionController::IsRouteFollowingActive() const
654{

Callers

nothing calls this directly

Calls 9

IsModeChangeViewportFunction · 0.85
SetIsValidAzimuthMethod · 0.80
SetAccuracyMethod · 0.80
SetRoutingModeMethod · 0.80
RenderAccuracyMethod · 0.80
RenderMyPositionMethod · 0.80
SetPositionObsoleteMethod · 0.45
SetPositionMethod · 0.45
SetAzimuthMethod · 0.45

Tested by

no test coverage detected