Expand description
Terminal graphics value types shared by Rio’s VT core and renderer.
This crate holds the plain data types produced by the terminal’s image
protocols (sixel, kitty, iTerm2) and the glyph protocol, with no
rendering, GPU, or windowing dependencies. It is the leaf both
rio-vt (the safe terminal core) and sugarloaf (the renderer)
depend on, so the core no longer has to pull the render stack just to
model an image.
Structs§
- Color
- RGBA color in linear-light 0..1 space. Mirrors
wgpu::Color’s shape so callers don’t have to depend onwgpu. Sugarloaf’s public API takes/returns this type; the wgpu render path converts at the boundary (see thewgpufeature’sFromimpls). - Graphic
- Graphic
Data - Defines a single graphic read from the PTY.
- Graphic
Id - Unique identifier for every graphic added to a grid. An id of 0 represents a temporary, non-referenceable image (matching kitty’s behavior).
- Graphic
Overlay - An overlay image placement. Used by the renderer to draw images on top of (or behind) terminal content.
- Resize
Command - Dimensions to resize a graphic.
Enums§
- Color
Type - Specifies the format of the pixel data.
- Resize
Parameter - Unit to specify a dimension to resize the graphic.
Constants§
Functions§
- atlas_
image_ key - Key for an atlas graphic (sixel/iTerm2): the sequential
GraphicIdshifted above the kitty u32 id space so a kitty client picking a high image id (kitten icat uses random u32 ids) can never collide with an atlas texture. - kitty_
image_ key - Key for
Sugarloaf::image_dataand the renderer’s per-image texture cache: a kitty image, keyed by its protocol id verbatim. The full u32 space belongs to the client, so atlas graphics live in a disjoint range above it (seeatlas_image_key).