KittyImageDrawable class final
A Drawable that renders an image using the Kitty Graphics Protocol.
This drawable uses the advanced Kitty graphics protocol to display high-resolution images. The image is transmitted as PNG for efficient bandwidth usage (dramatically smaller than raw RGBA).
It supports unique image ids for caching and cleanup — if no id is
provided, one is auto-assigned via KittyImage.getNextImageId. The image
can be scaled to fit specific columns and rows using the protocol's
native cell-based sizing.
Quiet mode is enabled by default to suppress terminal response sequences that would otherwise pollute the input stream.
- Implemented types
Constructors
- KittyImageDrawable(Image image, {int? id, int? columns, int? rows, int quiet = 2})
- Creates a Kitty protocol image drawable.
Properties
- columns → int?
-
Width of the drawable in terminal columns.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
Unique image identifier used for caching and later deletion.
final
- image → Image
-
The raw PNG-encoded image data.
final
- quiet → int
-
Quiet mode level for suppressing terminal responses.
final
- rows → int?
-
Height of the drawable in terminal rows.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bounds(
) → Rectangle -
Returns the bounds required to draw this drawable.
override
-
deleteSequence(
) → String - Returns an escape sequence that deletes this image from the terminal.
-
draw(
Screen screen, Rectangle area) → void -
Draws this drawable into
screenwithinarea.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited