Class: ScreenHelperCLI

ScreenHelperCLI()

Class representing a command-line interface screen helper.

Constructor

new ScreenHelperCLI()

Source:

Methods

percentToChar(percent, charWidthInPixelsopt) → {number}

Convert percent to characters.

Parameters:
Name Type Attributes Default Description
percent number

The percent to convert.

charWidthInPixels number <optional>
this.charWidthInPixels

The character width in pixels.

Source:
Returns:

The number of characters.

Type
number

pixelToChar(pixels, charWidthInPixelsopt) → {number}

Convert pixels to characters.

Parameters:
Name Type Attributes Default Description
pixels number

The number of pixels to convert.

charWidthInPixels number <optional>
this.charWidthInPixels

The character width in pixels.

Source:
Returns:

The number of characters.

Type
number

screenCharWitdh(charWidthInPixelsopt) → {number}

Get the screen character width.

Parameters:
Name Type Attributes Default Description
charWidthInPixels number <optional>
this.charWidthInPixels

The character width in pixels.

Source:
Returns:

The screen character width.

Type
number

screenPixelWitdh() → {number}

Get the screen pixel width.

Source:
Throws:

If an error occurs while executing the command.

Type
Error.Log
Returns:

The screen pixel width.

Type
number