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

Function GetTransitMarkerSizes

libs/map/transit/transit_display.cpp:104–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104vector<m2::PointF> GetTransitMarkerSizes(float markerScale, float maxRouteWidth)
105{
106 auto const vs = static_cast<float>(df::VisualParams::Instance().GetVisualScale());
107 vector<m2::PointF> markerSizes;
108 markerSizes.reserve(df::kRouteHalfWidthInPixelTransit.size());
109 for (auto const halfWidth : df::kRouteHalfWidthInPixelTransit)
110 {
111 float const d = 2.0f * min(halfWidth * vs, maxRouteWidth * 0.5f) * markerScale;
112 markerSizes.push_back(m2::PointF(d, d));
113 }
114 return markerSizes;
115}
116} // namespace
117
118TransitStepInfo::TransitStepInfo(TransitType type, double distance, int time, string const & number, uint32_t color,

Callers 1

CreateTransitMarksMethod · 0.70

Calls 4

GetVisualScaleMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected