Parameters
- partIndex
- Zero-based index. Specify 0 to remove a segment from the first part. Specify PartCount - 1 or -1 to remove a segment from the last part.
- segmentIndex
- Zero-based index. Specify 0 to remove the first segment. Specify GetSegmentCount - 1 or -1 to remove the last segment.
- closeGap
- Specifies if the gap left by the removed segment should be closed to create a connected part. It applies only to interior segments. In other words, if the first or last segment is removed, the closeGap argument is ignored.
You call RemoveSegment(0, 1, true) to remove Segment 1 from Part 0 and fill the gap. The end point of Segment 0 in the resulting polyline has been moved to coincide with the start point of Segment 1.