Dotty Documentation

0.1.1-bin-SNAPSHOT

object Ansi

[-] Constructors

[-] Members

[+] case class Attr

Represents a single, atomic ANSI escape sequence that results in a color, background or decoration being added to the output.

[+] object Attr
[+] object Back
[+] object Bold
[+] sealed abstract class Category

Represents a set of [[Ansi.Attr]]s all occupying the same bit-space in the state Short

[+] object Color
[+] object Reversed
[+] case class Str

Encapsulates a string with associated ANSI colors and text decorations.

Contains some basic string methods, as well as some ansi methods to e.g. apply particular colors or other decorations to particular sections of the [[Ansi.Str]]. [[render]] flattens it out into a java.lang.String with all the colors present as ANSI escapes.

[+] object Str
[+] object Underlined
[+] type State = Short

An [[Ansi.Str]]'s colors array is filled with shorts, each representing the ANSI state of one character encoded in its bits. Each [[Attr]] belongs to a [[Category]] that occupies a range of bits within each short:

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 |-----------| |--------| |--------| | | |bold | | | | |reversed | | | |underlined | | |foreground-color | |background-color |unused

The 0000 0000 0000 0000 short corresponds to plain text with no decoration

[+] val categories : List [ Category ]
[+] val hardOffMask : Int