Table of Contents

Method GetRegion

Namespace
Terminal.Gui.Drawing
Assembly
Terminal.Gui.dll

GetRegion(Dictionary<Point, Cell?>)

Efficiently builds a Region from line cells by grouping contiguous horizontal spans. This avoids the performance overhead of adding each cell individually while accurately representing the non-rectangular shape of the lines.

public static Region GetRegion(Dictionary<Point, Cell?> cellMap)

Parameters

cellMap Dictionary<Point, Cell?>

Dictionary of points where line cells are drawn. If empty, returns an empty Region.

Returns

Region

A Region encompassing all the line cells, or an empty Region if cellMap is empty