aerc/lib/ui/fill.go

27 lines
377 B
Go
Raw Normal View History

2018-02-28 03:17:26 +01:00
package ui
import (
"github.com/gdamore/tcell/v2"
2018-02-28 03:17:26 +01:00
)
type Fill struct {
Rune rune
Style tcell.Style
}
2018-02-28 03:17:26 +01:00
func NewFill(f rune, s tcell.Style) Fill {
return Fill{f, s}
2018-02-28 03:17:26 +01:00
}
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)
2018-02-28 03:17:26 +01:00
}
}
}
func (f Fill) Invalidate() {
// no-op
}