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
PlacementThe 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
stringThe path to the file containing the ASCII art.
placement
PlacementThe 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
Height
Gets the height of the ASCIIArt element.
public override int Height { get; }
Property Value
Placement
Gets the position of the ASCIIArt element on the screen.
public override Placement Placement { get; }
Property Value
TextAlignment
Gets the alignment of the ASCIIArt element.
public override TextAlignment TextAlignment { get; }
Property Value
Width
Gets the width of the ASCIIArt element.
public override int Width { get; }
Property Value
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
stringThe 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
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
stringThe 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
PlacementThe new placement of the ASCIIArt element.
Remarks
For more information, consider visiting the documentation available here.