namespace Terminal.Gui;
///
/// Describes a pair of which cooperate in creating
/// . One gives foreground color while other gives background.
///
public class FillPair
{
///
/// Creates a new instance using the provided fills for foreground and background
/// color when assembling .
///
///
///
public FillPair (IFill fore, IFill back)
{
Foreground = fore;
Background = back;
}
///
/// The fill which provides point based foreground color.
///
public IFill Foreground { get; init; }
///
/// The fill which provides point based background color.
///
public IFill Background { get; init; }
///
/// Returns the color pair (foreground+background) to use when rendering
/// a rune at the given .
///
///
///
public Attribute GetAttribute (Point point)
{
return new (Foreground.GetColor (point), Background.GetColor (point));
}
}