function:
go
func NewPainter(s Surface, p *Theme) *Painter
need Surface interface param, but the interface Surface:
go
type Surface interface {
SetCell(x, y int, ch rune, s Style)
SetCursor(x, y int)
HideCursor()
Begin()
End()
Size() image.Point
}
has the only one impl:
go
type tcellSurface struct {
screen tcell.Screen
}
and that cannot got outside the tui package
so, how to use NewPainter?
该提问来源于开源项目:marcusolsson/tui-go