Documentation
¶
Overview ¶
Package graphics serializes Kitty image commands with Bubble Tea's frame writes.
Index ¶
- func Eligible() bool
- func Fit(img *mermaid.Image, width, height int, cellW, cellH float64) (int, int)
- func FitInline(img *mermaid.Image, width int, cellW, cellH float64) (int, int)
- type Capability
- type Writer
- func (w *Writer) Close() error
- func (w *Writer) Fd() uintptr
- func (w *Writer) ID(img *mermaid.Image) int
- func (w *Writer) Read(p []byte) (int, error)
- func (w *Writer) Row(id int, img *mermaid.Image, cols, rows, row, from, to int) string
- func (w *Writer) Use(images []*mermaid.Image)
- func (w *Writer) Write(p []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Capability ¶
type Capability struct{ CellWidth, CellHeight float64 }
func CellSize ¶
func CellSize(fallback Capability) Capability
CellSize uses the current terminal pixels on resize, including font changes.
func Probe ¶
func Probe() (Capability, bool)
Probe runs before Bubble Tea owns input. A bounded, positive graphics/version/ cell-size handshake is required; environment variables alone are insufficient.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) Row ¶
Row uses 256-cell tiles so every coordinate has a representable diacritic, including very tall diagrams and zoomed views. All cells encode all 3 values.
Click to show internal directories.
Click to hide internal directories.