TxImageSpriteBlock class
Represents an image of a specified size sliced into a number of "sprite lines" of the full width of the image, and the specified height, and possibly a final sprite line of a different height. When sending TxImageSpriteBlock to Frame, the sendMessage() will send the header with block dimensions and sprite line height, 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 line height 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). Sending an ImageSpriteBlock with no lines is not intended usage.
Constructors
- TxImageSpriteBlock({required TxSprite image, required int spriteLineHeight, bool progressiveRender = true, bool updatable = true})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → int
-
no setter
- isEmpty → bool
-
After construction, an ImageSpriteBlock should be tested that it has a non-zero number of
sprite lines to send, otherwise it should not be sent
no setter
- isNotEmpty → bool
-
After construction, an ImageSpriteBlock should be tested that it has a non-zero number of
sprite lines to send, otherwise it should not be sent
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spriteLineHeight → int
-
no setter
-
spriteLines
→ List<
TxSprite> -
no setter
- 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
-
toPngBytes(
) → Future< Uint8List> - Convert TxImageSpriteBlock back to a single image for testing/verification startLine and endLine are inclusive
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited