Logo
ConsoleMonster.Widgets
Banner text drawn with a built-in 5x7 pixel font on a half-block canvas (two pixel rows per cell, four cell rows tall) with a horizontal colour gradient, and an optional tagline. On the Ascii tier the same font is drawn with #; when the banner does not fit, it falls back to bold text.
Inheritance
- object
- Logo
Usage
Explore 23 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 11
- Method Ui.Logo
- Extension method Logo.Alignment
- Extension method Logo.EndColor
- Extension method Logo.StartColor
- Extension method Logo.Tagline
- Extension method Logo.Text
- Method LogoFluent.Alignment
- Method LogoFluent.EndColor
- Method LogoFluent.StartColor
- Method LogoFluent.Tagline
- Method LogoFluent.Text
Accepted by parameters 12
- Method ContentBuilder.Logo
- Method ContentBuilder.Logo
- Extension method Logo.Alignment
- Extension method Logo.EndColor
- Extension method Logo.StartColor
- Extension method Logo.Tagline
- Extension method Logo.Text
- Method LogoFluent.Alignment
- Method LogoFluent.EndColor
- Method LogoFluent.StartColor
- Method LogoFluent.Tagline
- Method LogoFluent.Text
Constructors
public Logo(string text, string? tagline = null) #Creates a logo.
Parameters
- text string
- The banner text (A-Z, 0-9 and - . : ! / _).
- tagline string? = null
- An optional tagline under the banner (markup).
Methods
public Size Measure(Constraints constraints, RenderContext context) #Returns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
public void Render(Region region, RenderContext context) #Renders into a region. The region may be smaller or larger than the measured size.
Parameters
- region ConsoleMonster.Canvas.Region
- The target region.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Inherited Methods
Properties
public HorizontalAlignment Alignment { get; set; } #Alignment of the banner and tagline (default left).
Extension Methods
public static Logo Alignment(Logo logo, HorizontalAlignment value) #Sets Logo.Alignment: Alignment of the banner and tagline (default left).
Parameters
- logo ConsoleMonster.Widgets.Logo
- The instance.
- value ConsoleMonster.Layout.HorizontalAlignment
- The value.
Examples
// C# initializer or property // C# fluent
logo.Alignment = value; Ui.Logo().Alignment(value);public static Logo EndColor(Logo logo, Color value) #Sets Logo.EndColor: The gradient end colour (default violet).
Parameters
- logo ConsoleMonster.Widgets.Logo
- The instance.
- value ConsoleMonster.Styling.Color
- The value.
Examples
// C# initializer or property // C# fluent
logo.EndColor = value; Ui.Logo().EndColor(value);public static Logo StartColor(Logo logo, Color value) #Sets Logo.StartColor: The gradient start colour (default sky blue).
Parameters
- logo ConsoleMonster.Widgets.Logo
- The instance.
- value ConsoleMonster.Styling.Color
- The value.
Examples
// C# initializer or property // C# fluent
logo.StartColor = value; Ui.Logo().StartColor(value);public static Logo Tagline(Logo logo, string? value) #Sets Logo.Tagline: The tagline (markup).
Parameters
- logo ConsoleMonster.Widgets.Logo
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
logo.Tagline = value; Ui.Logo().Tagline(value);