private void SetSegmentLists() { int segmentNumber = vline.GetSegmentNumber(); segments = new List <Segment>(segmentNumber); for (int i = 0; i < segmentNumber; i++) { segments.Add(new Segment(vline.GetColor(i), vline.GetWidth(i))); } }