Table of Contents

Class ASCIIArt

Namespace
ConsoleAppVisuals.PassiveElements
Assembly
ConsoleAppVisuals.dll

The ASCIIArt is a passive element that displays ASCII art from a file or string content.

public class ASCIIArt : PassiveElement
Inheritance
ASCIIArt
Inherited Members

Remarks

For more information, consider visiting the documentation available here.

Constructors

ASCIIArt(List<string>, Placement)

The ASCIIArt is a passive element that displays ASCII art from a list of strings.

public ASCIIArt(List<string> artLines, Placement placement = Placement.TopCenter)

Parameters

artLines List<string>

The lines of ASCII art to display.

placement Placement

The placement of the ASCIIArt element on the screen.

Remarks

For more information, consider visiting the documentation available here.

ASCIIArt(string, Placement)

The ASCIIArt is a passive element that displays ASCII art from a file.

public ASCIIArt(string filePath, Placement placement = Placement.TopCenter)

Parameters

filePath string

The path to the file containing the ASCII art.

placement Placement

The placement of the ASCIIArt element on the screen.

Remarks

For more information, consider visiting the documentation available here.

Properties

ArtLines

Gets the art lines of the ASCIIArt element.

public List<string> ArtLines { get; }

Property Value

List<string>

Height

Gets the height of the ASCIIArt element.

public override int Height { get; }

Property Value

int

Placement

Gets the position of the ASCIIArt element on the screen.

public override Placement Placement { get; }

Property Value

Placement

TextAlignment

Gets the alignment of the ASCIIArt element.

public override TextAlignment TextAlignment { get; }

Property Value

TextAlignment

Width

Gets the width of the ASCIIArt element.

public override int Width { get; }

Property Value

int

Methods

RenderElementActions()

Defines the actions to perform when the element is called to be rendered on the console.

[Visual]
protected override void RenderElementActions()

UpdateArt(string)

Updates the ASCII art from a multiline string.

public void UpdateArt(string art)

Parameters

art string

The new ASCII art as a multiline string.

Remarks

For more information, consider visiting the documentation available here.

UpdateArtLines(List<string>)

Updates the ASCII art lines.

public void UpdateArtLines(List<string> artLines)

Parameters

artLines List<string>

The new ASCII art lines.

Remarks

For more information, consider visiting the documentation available here.

UpdateFromFile(string)

Updates the ASCII art from a file.

public void UpdateFromFile(string filePath)

Parameters

filePath string

The path to the file containing the new ASCII art.

Remarks

For more information, consider visiting the documentation available here.

UpdatePlacement(Placement)

Updates the placement of the ASCIIArt element on the screen.

public void UpdatePlacement(Placement newPlacement)

Parameters

newPlacement Placement

The new placement of the ASCIIArt element.

Remarks

For more information, consider visiting the documentation available here.