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

Method BuildArrows

libs/drape_frontend/route_builder.cpp:56–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56void RouteBuilder::BuildArrows(ref_ptr<dp::GraphicsContext> context, dp::DrapeID subrouteId,
57 std::vector<ArrowBorders> const & borders, ref_ptr<dp::TextureManager> textures,
58 int recacheId)
59{
60 auto it = m_routeCache.find(subrouteId);
61 if (it == m_routeCache.end())
62 return;
63
64 drape_ptr<SubrouteArrowsData> routeArrowsData = make_unique_dp<SubrouteArrowsData>();
65 routeArrowsData->m_subrouteId = subrouteId;
66 routeArrowsData->m_pivot = it->second.m_polyline.GetLimitRect().Center();
67 routeArrowsData->m_recacheId = recacheId;
68 RouteShape::CacheRouteArrows(context, textures, it->second.m_polyline, borders, it->second.m_baseDepthIndex,
69 *routeArrowsData.get());
70
71 // Flush route arrows geometry.
72 context->Flush();
73
74 if (m_flushArrowsFn != nullptr)
75 m_flushArrowsFn(std::move(routeArrowsData));
76}
77} // namespace df

Callers 1

AcceptMessageMethod · 0.80

Calls 6

getMethod · 0.65
findMethod · 0.45
endMethod · 0.45
CenterMethod · 0.45
GetLimitRectMethod · 0.45
FlushMethod · 0.45

Tested by

no test coverage detected