| 1133 | } |
| 1134 | |
| 1135 | void TransitSchemeBuilder::GenerateStop(ref_ptr<dp::GraphicsContext> context, StopNodeParamsSubway const & stopParams, |
| 1136 | m2::PointD const & pivot, |
| 1137 | std::map<routing::transit::LineId, LineParams> const & lines, |
| 1138 | dp::Batcher & batcher) |
| 1139 | { |
| 1140 | bool const severalRoads = stopParams.m_stopsInfo.size() > 1; |
| 1141 | |
| 1142 | if (severalRoads) |
| 1143 | { |
| 1144 | GenerateTransfer(context, stopParams, pivot, batcher); |
| 1145 | return; |
| 1146 | } |
| 1147 | |
| 1148 | float constexpr kInnerScale = 0.8f; |
| 1149 | float constexpr kOuterScale = 2.0f; |
| 1150 | |
| 1151 | auto const lineId = *stopParams.m_stopsInfo.begin()->second.m_lines.begin(); |
| 1152 | auto const colorName = df::GetTransitColorName(lines.at(lineId).m_color); |
| 1153 | auto const outerColor = GetColorConstant(colorName); |
| 1154 | |
| 1155 | auto const innerColor = GetColorConstant(kTransitStopInnerColor); |
| 1156 | |
| 1157 | m2::PointD const pt = MapShape::ConvertToLocal(stopParams.m_pivot, pivot, kShapeCoordScalar); |
| 1158 | |
| 1159 | m2::PointD dir = stopParams.m_shapesInfo.begin()->second.m_direction; |
| 1160 | |
| 1161 | GenerateMarker(context, pt, dir, 1.0f, 1.0f, kOuterScale, kOuterScale, kOuterMarkerDepth, outerColor, batcher); |
| 1162 | |
| 1163 | GenerateMarker(context, pt, dir, 1.0f, 1.0f, kInnerScale, kInnerScale, kInnerMarkerDepth, innerColor, batcher); |
| 1164 | } |
| 1165 | |
| 1166 | std::pair<m2::PointD, size_t> GetFittingDirectionAndSize(std::vector<ShapeInfoPT> const & shapeInfos) |
| 1167 | { |
nothing calls this directly
no test coverage detected