Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASCII ¶
type ASCII struct {
}
ASCII renders an image as ANSI-styled ASCII characters. It works in terminals that do not implement a graphical image protocol.
type CellSizeRenderer ¶ added in v1.2.0
CellSizeRenderer uses the terminal's pixel dimensions for a character cell. Sixel rasters are sized in pixels, so they need this information to match a layout expressed in character cells.
type Dots ¶
type Dots struct{}
Dots renders images as ANSI-colored Unicode Braille characters. Each terminal cell represents a 2 by 4 pixel block, providing more detail than ASCII art while requiring no graphics protocol.
type Iterm ¶
type Iterm struct{}
Iterm renders images with the iTerm2 inline image protocol.
type Kitty ¶
type Kitty struct {
// contains filtered or unexported fields
}
Kitty renders images with the Kitty graphics protocol.
type Renderer ¶
type Renderer interface {
Name() string
Render(image.Image, Area) (string, error)
Clear(Area) string
}
Renderer converts an image into terminal protocol escape sequences. It never writes to stdout: Bubble Tea remains the sole output owner.
func NewRenderer ¶
NewRenderer returns the requested renderer. The auto setting keeps Kitty as the default and selects iTerm2 or Sixel when the terminal identifies itself as supporting one of those protocols.
type Sixel ¶
type Sixel struct {
// contains filtered or unexported fields
}
Sixel renders images with the DEC Sixel graphics protocol.
func (*Sixel) CellAspect ¶ added in v1.2.0
func (*Sixel) Clear ¶
Clear replaces the prior image rectangle with the terminal background, preserving the header and footer Bubble Tea draws in the alternate screen.
func (*Sixel) RenderSpread ¶
RenderSpread draws a book spread as one raster. Some Sixel terminals do not preserve horizontal cursor placement between consecutive sixel commands, so emitting a single raster prevents the second page from covering the first.
func (*Sixel) SetCellSize ¶ added in v1.2.0
SetCellSize updates the pixel dimensions used to translate character-cell layout coordinates into a Sixel raster. Invalid measurements keep the last known dimensions.