CanvasTerminal class

A RenderableTerminal that draws to a canvas element using a browser font.

Inheritance

Constructors

CanvasTerminal(int width, int height, Font font, [CanvasElement? canvas])
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 column x, row y using fore as the text color and back 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 column x, row y using fore as the text color and back as the background color.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited