Files
aerc-fork-mirror/lib/ui/fill.go
Tim Culverhouse f001f65240 fill: replace tcell.Style with vaxis.Style
Replace the Fill implementation with vaxis style objects

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2024-02-12 13:48:47 +01:00

25 lines
372 B
Go

package ui
import "git.sr.ht/~rockorager/vaxis"
type Fill struct {
Rune rune
Style vaxis.Style
}
func NewFill(f rune, s vaxis.Style) Fill {
return Fill{f, s}
}
func (f Fill) Draw(ctx *Context) {
for x := 0; x < ctx.Width(); x += 1 {
for y := 0; y < ctx.Height(); y += 1 {
ctx.SetCell(x, y, f.Rune, f.Style)
}
}
}
func (f Fill) Invalidate() {
// no-op
}