TxTextSpriteBlock class

Inheritance

Constructors

TxTextSpriteBlock({required int msgCode, required int width, required int fontSize, required int displayRows, String? fontFamily, TextAlign textAlign = ui.TextAlign.left, TextDirection textDirection = ui.TextDirection.ltr, required String text})
Represents an (optionally) multi-line block of text of a specified width and number of visible rows at a specified lineHeight If the supplied text string is longer, only the last displayRows will be shown rendered and sent to Frame. If the supplied text string has fewer than or equal to displayRows, only the number of actual rows will be rendered and sent to Frame If any given line of text is shorter than width, the text Sprite will be set to the actual width required. When sending TxTextSpriteBlock to Frame, the sendMessage() will send the header with block dimensions and line-by-line offsets and the user then sends each line[] as a TxSprite message with the same msgCode as the Block, and the frame app will use the offsets to place each line. By sending each line separately we can display them as they arrive, as well as reducing overall memory requirement (each concat() call is smaller)

Properties

fontSize int
no setter
hashCode int
The hash code for this object.
no setterinherited
lines List<TxSprite>
no setter
msgCode int
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width int
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pack() Uint8List
Corresponding parser should be called from frame_app data handler
override
rasterize() Future<void>
Since the Paragraph rasterizing to the Canvas, and the getting of the Image bytes are async functions
toPngBytes() Future<Uint8List>
Convert TxTextSpriteBlock back to a single image for testing/verification
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

monochromePal ↔ PaletteUint8?
getter/setter pair