RetroTerminal class
A RenderableTerminal that draws to a canvas using the old school DOS code page 437 font.
- Inheritance
-
- Object
- Terminal
- RenderableTerminal
- RetroTerminal
Constructors
- RetroTerminal(int width, int height, String imageUrl, {CanvasElement? canvas, required int charWidth, required int charHeight, int? scale})
-
Creates a new terminal using a font image at
imageUrl
.factory - RetroTerminal.dos(int width, int height, [CanvasElement? canvas])
-
Creates a new terminal using a built-in DOS-like font.
factory
- RetroTerminal.shortDos(int width, int height, [CanvasElement? canvas])
-
Creates a new terminal using a short built-in DOS-like font.
factory
Properties
- backColor ↔ Color
-
The default foreground color used when a color is not specified.
getter/setter pairinherited
- foreColor ↔ Color
-
The default foreground color used when a color is not specified.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → int
-
The number of rows of characters.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → Vec
-
The number of columns and rows.
no setteroverride
- width → int
-
The number of columns of characters.
no setteroverride
Methods
-
clear(
) → void -
Clears the terminal to backColor.
inherited
-
drawChar(
int x, int y, int charCode, [Color? fore, Color? back]) → void -
Writes a one-character string consisting of
charCode
at columnx
, rowy
usingfore
as the text color andback
as the background color.inherited -
drawGlyph(
int x, int y, Glyph glyph) → void -
override
-
fill(
int x, int y, int width, int height, [Color? color]) → void -
Clears and fills the given rectangle with
color
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pixelToChar(
Vec pixel) → Vec -
Given a point in pixel coordinates, returns the coordinates of the
character that contains that pixel.
override
-
rect(
int x, int y, int width, int height) → Terminal -
inherited
-
render(
) → void -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
writeAt(
int x, int y, String text, [Color? fore, Color? back]) → void -
Writes
text
starting at columnx
, rowy
usingfore
as the text color andback
as the background color.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited