SegmentLine

Represents a collection of segments.

Represents a collection of segments.

Constructors

public SegmentLine()

Initializes a new instance of the SegmentLine class.

public SegmentLine(IEnumerable<Segment> segments)

Initializes a new instance of the SegmentLine class.

Parameters:

segments (IEnumerable<Segment>)
The segments.

Properties

Length : int

Gets the width of the line.

Methods

public int CellCount()

Gets the number of cells the segment line occupies.

Returns:

The cell width of the segment line.

public void Prepend(Segment segment)

Preprends a segment to the line.

Parameters:

segment (Segment)
The segment to prepend.