Skip to content
ConsoleMonster

API Reference

Class

Logo

Namespace ConsoleMonster.Widgets
Assembly ConsoleMonster
Source Logo.cs:30
Implements
Modifiers sealed

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 20 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 10

Accepted by parameters 10

Constructors

public Logo(String text, String? tagline = null) #

Creates a logo.

Parameters

text System.String requiredposition: 0
The banner text (A-Z, 0-9 and - . : ! / _).
tagline System.String? = null optionalposition: 1
An optional tagline under the banner (markup).

Methods

public Size Measure(Constraints constraints, RenderContext context) #
Returns: Size

Returns the size the widget wants within the constraints.

Parameters

constraints ConsoleMonster.Layout.Constraints requiredposition: 0
The space offered.
context ConsoleMonster.Canvas.RenderContext requiredposition: 1
Profile, theme and glyphs.

Returns

The desired size, never larger than the constraints.

public Void Render(Region region, RenderContext context) #
Returns: Void

Renders into a region. The region may be smaller or larger than the measured size.

Parameters

region ConsoleMonster.Canvas.Region requiredposition: 0
The target region.
context ConsoleMonster.Canvas.RenderContext requiredposition: 1
Profile, theme and glyphs.

Properties

public String Text { get; set; } #

The banner text.

public String? Tagline { get; set; } #

The tagline (markup).

public Color From { get; set; } #

The gradient start colour (default sky blue).

public Color To { get; set; } #

The gradient end colour (default violet).

public HorizontalAlignment Alignment { get; set; } #

Alignment of the banner and tagline (default left).

Extension Methods

public static Logo WithAlignment(Logo logo, HorizontalAlignment value) #
Returns: Logo

Sets Logo.Alignment: Alignment of the banner and tagline (default left).

Parameters

logo ConsoleMonster.Widgets.Logo requiredposition: 0
The instance.
value ConsoleMonster.Layout.HorizontalAlignment requiredposition: 1
The value.

Returns

The same instance.

public static Logo WithFrom(Logo logo, Color value) #
Returns: Logo

Sets Logo.From: The gradient start colour (default sky blue).

Parameters

logo ConsoleMonster.Widgets.Logo requiredposition: 0
The instance.
value ConsoleMonster.Styling.Color requiredposition: 1
The value.

Returns

The same instance.

public static Logo WithTagline(Logo logo, String? value) #
Returns: Logo

Sets Logo.Tagline: The tagline (markup).

Parameters

logo ConsoleMonster.Widgets.Logo requiredposition: 0
The instance.
value System.String? requiredposition: 1
The value.

Returns

The same instance.

public static Logo WithText(Logo logo, String value) #
Returns: Logo

Sets Logo.Text: The banner text.

Parameters

logo ConsoleMonster.Widgets.Logo requiredposition: 0
The instance.
value System.String requiredposition: 1
The value.

Returns

The same instance.

public static Logo WithTo(Logo logo, Color value) #
Returns: Logo

Sets Logo.To: The gradient end colour (default violet).

Parameters

logo ConsoleMonster.Widgets.Logo requiredposition: 0
The instance.
value ConsoleMonster.Styling.Color requiredposition: 1
The value.

Returns

The same instance.