drawCustomCoordinates_(flatCoordinates, offset, ends, stride, builderEnds) {
    for (let i = 0, ii = ends.length; i < ii; ++i) {
      const end = ends[i];
      const builderEnd = this.appendFlatLineCoordinates(
        flatCoordinates,
        offset,
        end,
        stride,
        false,
        false,
      );
      builderEnds.push(builderEnd);
      offset = end;
    }
    return offset;
  }
@param {Array<number>} flatCoordinates Flat coordinates.
@param {number} offset Offset.
@param {Array<number>} ends Ends.
@param {number} stride Stride.
@param {Array<number>} builderEnds Builder ends.
@return {number} Offset.