Documentation
¶
Index ¶
- Constants
- Variables
- func PlaceholderSymbol(at geom.Point) string
- type Buffer
- func (b *Buffer) Blit(src *Buffer, at geom.Point)
- func (b *Buffer) Clear()
- func (b *Buffer) Fill(style Style)
- func (b *Buffer) FillRange(p geom.Point, width int, style Style)
- func (b *Buffer) Get(p geom.Point) Cell
- func (b *Buffer) PatchBg(p geom.Point, bg Color)
- func (b *Buffer) PatchBgRange(p geom.Point, width int, bg Color)
- func (b *Buffer) RenderToANSI() string
- func (b *Buffer) Set(p geom.Point, c Cell)
- func (b *Buffer) SetRightAlignedInt(p geom.Point, width, n int, style Style)
- func (b *Buffer) SetString(p geom.Point, s string, style Style)
- type Cell
- type Color
- type Modifier
- type Style
- func (s Style) Bg(c Color) Style
- func (s Style) BgColor() Color
- func (s Style) Fg(c Color) Style
- func (s Style) FgColor() Color
- func (s Style) HasMod(m Modifier) bool
- func (s Style) Mod(m Modifier) Style
- func (s Style) Modifier() Modifier
- func (s Style) UlColor(c Color) Style
- func (s Style) UlStyle(u UnderlineStyle) Style
- func (s Style) UnderlineColor() Color
- func (s Style) UnderlineStyle() UnderlineStyle
- type UnderlineStyle
Constants ¶
const PlaceholderRune = kitty.Placeholder
PlaceholderRune is kitty's Unicode image placeholder
Variables ¶
var ( ColorReset = Color{/* contains filtered or unexported fields */} ColorBlack = Color{/* contains filtered or unexported fields */} ColorRed = Color{/* contains filtered or unexported fields */} ColorGreen = Color{/* contains filtered or unexported fields */} ColorYellow = Color{/* contains filtered or unexported fields */} ColorBlue = Color{/* contains filtered or unexported fields */} ColorMagenta = Color{/* contains filtered or unexported fields */} ColorCyan = Color{/* contains filtered or unexported fields */} ColorGray = Color{/* contains filtered or unexported fields */} ColorLightRed = Color{/* contains filtered or unexported fields */} ColorLightGreen = Color{/* contains filtered or unexported fields */} ColorLightYellow = Color{/* contains filtered or unexported fields */} ColorLightBlue = Color{/* contains filtered or unexported fields */} ColorLightMagenta = Color{/* contains filtered or unexported fields */} ColorLightCyan = Color{/* contains filtered or unexported fields */} ColorLightGray = Color{/* contains filtered or unexported fields */} ColorWhite = Color{/* contains filtered or unexported fields */} )
Functions ¶
func PlaceholderSymbol ¶
PlaceholderSymbol builds the cell content for image row and column
Types ¶
type Buffer ¶
func (*Buffer) FillRange ¶
FillRange fills width cells with a space in the given style. A style with no background is transparent: each cell keeps its existing background so a pre-painted layer (ruler, cursorline) shows through
func (*Buffer) PatchBg ¶
PatchBg sets only the background color of the cell at p, preserving its symbol and foreground. Used to overlay rulers behind already-rendered text
func (*Buffer) PatchBgRange ¶
PatchBgRange sets only the background color of width cells starting at p, preserving each cell's symbol and foreground. Used to overlay a row highlight behind already-rendered text
func (*Buffer) RenderToANSI ¶
RenderToANSI serializes the buffer as rows joined by '\n', emitting style escapes only on changes — used to bridge into the string-based render path
func (*Buffer) SetRightAlignedInt ¶
SetRightAlignedInt writes n as decimal digits right-aligned in a field of width starting at p, padding left with spaces
type Color ¶
type Color struct {
// contains filtered or unexported fields
}
func ColorIndexed ¶
func ImageColor ¶
ImageColor encodes a 24-bit image id as a terminal color
type Modifier ¶
type Modifier uint16
const ( ModifierBold Modifier = 0b0000_0000_0001 ModifierDim Modifier = 0b0000_0000_0010 ModifierItalic Modifier = 0b0000_0000_0100 ModifierSlowBlink Modifier = 0b0000_0001_0000 ModifierRapidBlink Modifier = 0b0000_0010_0000 ModifierReversed Modifier = 0b0000_0100_0000 ModifierHidden Modifier = 0b0000_1000_0000 ModifierCrossedOut Modifier = 0b0001_0000_0000 )
type Style ¶
type Style struct {
// contains filtered or unexported fields
}
func (Style) UlStyle ¶
func (s Style) UlStyle(u UnderlineStyle) Style
func (Style) UnderlineColor ¶
UnderlineColor returns the style underline color
func (Style) UnderlineStyle ¶
func (s Style) UnderlineStyle() UnderlineStyle
UnderlineStyle returns the style underline variant
type UnderlineStyle ¶
type UnderlineStyle uint8
const ( UnderlineReset UnderlineStyle = iota UnderlineLine UnderlineCurl UnderlineDotted UnderlineDashed UnderlineDoubleLine )