isInLineSection static method

bool isInLineSection(
  1. TaggedLineString line,
  2. List<int> sectionIndex,
  3. TaggedLineSegment seg
)

Tests whether a segment is in a section of a TaggedLineString @param line @param sectionIndex @param seg @return

Implementation

static bool isInLineSection(
    TaggedLineString line, List<int> sectionIndex, TaggedLineSegment seg) {
  // not in this line
  if (seg.getParent() != line.getParent()) return false;
  int? segIndex = seg.getIndex();
  if (segIndex != null &&
      segIndex >= sectionIndex[0] &&
      segIndex < sectionIndex[1]) {
    return true;
  }
  return false;
}