Display class

Class for displaying text and graphics on the Frame display.

Constructors

Display(Frame frame)

Properties

charSpacing int
getter/setter pair
frame Frame
final
hashCode int
The hash code for this object.
no setterinherited
lineHeight int
Gets the height of each line of text in pixels.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Clears the display buffer.
drawRect(int x, int y, int w, int h, PaletteColors color) Future<void>
Draws a rectangle on the display.
drawRectFilled(int x, int y, int w, int h, int borderWidth, PaletteColors borderColor, PaletteColors fillColor) Future<void>
Draws a filled rectangle with a border on the display.
getTextHeight(String text) int
Calculates the total height of the given text in pixels.
getTextWidth(String text) int
Calculates the width of the given text in pixels.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
scrollText(String text, {int linesPerFrame = 5, double delay = 0.12, PaletteColors? textColor}) Future<void>
Scrolls text on the display.
setPalette(PaletteColors paletteIndex, Color newColor) Future<void>
Sets a custom color in the palette.
show() Future<void>
Shows the display buffer on the screen.
showText(String text, {int x = 1, int y = 1, int? maxWidth = 640, int? maxHeight, PaletteColors? color, Alignment2D align = Alignment2D.topLeft}) Future<void>
Shows text on the display.
toString() String
A string representation of this object.
inherited
wrapText(String text, int maxWidth) String
Wraps text to fit within a given width.
writeText(String text, {int x = 1, int y = 1, int? maxWidth = 640, int? maxHeight, PaletteColors? color, Alignment2D align = Alignment2D.topLeft}) Future<void>
Writes text to the display buffer.

Operators

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

Static Properties

colorPaletteMapping Map<PaletteColors, Color>
final