#nullable enable
namespace Terminal.Gui.Text;
///
/// Interface for rendering formatted text to the console.
///
public interface ITextRenderer
{
///
/// Draws the formatted text to the console driver.
///
/// The formatted text to draw.
/// The screen bounds for drawing.
/// The color for normal text.
/// The color for HotKey text.
/// Whether to fill remaining area with spaces.
/// The maximum container bounds.
/// The console driver to use for drawing.
void Draw(
FormattedText formattedText,
Rectangle screen,
Attribute normalColor,
Attribute hotColor,
bool fillRemaining = false,
Rectangle maximum = default,
IConsoleDriver? driver = null);
///
/// Gets the region that would be drawn by the formatted text.
///
/// The formatted text.
/// The screen bounds.
/// The maximum container bounds.
/// A region representing the areas that would be drawn.
Region GetDrawRegion(
FormattedText formattedText,
Rectangle screen,
Rectangle maximum = default);
}