Table of Contents

Method GetDrawRegion

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

GetDrawRegion(Rectangle, Rectangle)

Calculates and returns a Region describing the areas where text would be output, based on the formatting rules of TextFormatter.

public Region GetDrawRegion(Rectangle screen, Rectangle maximum = default)

Parameters

screen Rectangle

Specifies the screen-relative location and maximum size for drawing the text.

maximum Rectangle

Specifies the screen-relative location and maximum container size.

Returns

Region

A Region representing the areas where text would be drawn.

Remarks

Uses the same formatting logic as Draw(Rectangle, Attribute, Attribute, Rectangle, IConsoleDriver?), including alignment, direction, word wrap, and constraints, but does not perform actual drawing to IConsoleDriver.