docs: @Pure
  	public void toPath2D(Path2d path) {
  		if (isValidPrimitive()) {
  			final BusItineraryHalt startTerminus = getBusHaltAt(0);
  			final BusItineraryHalt endTerminus = getBusHaltAt(getValidBusHaltCount() - 1);
  
  			if (startTerminus.getRoadSegmentIndex() == endTerminus.getRoadSegmentIndex()) {
  				// One segment to render
  				double p1 = startTerminus.getPositionOnSegment();
  				double p2 = endTerminus.getPositionOnSegment();
  				final RoadSegment segment = startTerminus.getRoadSegment();
  
  				if (p1 > p2) {
  					final double t = p1;
  					p1 = p2;
  					p2 = t;
  				}
  				// Caution: Assume that all given road segments are MapPolyline instances
  				segment.toPath2D(path, p1, p2);
  			} else {
  				RoadSegment seg = startTerminus.getRoadSegment();
  				if (seg != null) {
  					final Direction1D d = getRoadSegmentDirection(startTerminus.getRoadSegmentIndex());
  					final double p1;
  					final double p2;
  					if (d.isSegmentDirection()) {
  						p1 = startTerminus.getPositionOnSegment();
  						p2 = Double.NaN;
  					} else {
  						p1 = Double.NaN;
  						p2 = startTerminus.getPositionOnSegment();
  					}
  
  					// Caution: Assume that all given road segments are MapPolyline instances
  					seg.toPath2D(path, p1, p2);
  				}
  
  				for (int i = startTerminus.getRoadSegmentIndex() + 1; i < endTerminus.getRoadSegmentIndex(); ++i) {
  					getRoadSegmentAt(i).toPath2D(path);
  				}
  
  				seg = endTerminus.getRoadSegment();
  				if (seg != null) {
  					final Direction1D d = getRoadSegmentDirection(endTerminus.getRoadSegmentIndex());
  					final double p1;
  					final double p2;
  					if (d.isSegmentDirection()) {
  						p1 = Double.NaN;
  						p2 = endTerminus.getPositionOnSegment();
  					} else {
  						p1 = endTerminus.getPositionOnSegment();
  						p2 = Double.NaN;
  					}
  
  					// Caution: Assume that all given road segments are MapPolyline instances
  					seg.toPath2D(path, p1, p2);
  				}
  			}
  		} else {
  			// Because there is no enough valid bus halt in the itinerary,
  			// all the road segments covered by the itinerary should be
  			// drawn to indicate where the itinerary is.
  			// Moreover, bus halts are simply drawn.
  			for (final RoadSegment segment : roadSegments()) {
  				segment.toPath2D(path);
  			}
  		}
  	}