added Fill method
This commit is contained in:
parent
f72c9e7aa3
commit
011bf8e616
@ -10,3 +10,12 @@ func (b *Buffer) WriteString(str string, x, y int) {
|
||||
b.Set(x+dx, y, r)
|
||||
}
|
||||
}
|
||||
|
||||
// Fill fills the whole buffer with c
|
||||
func (b *Buffer) Fill(c rune) {
|
||||
for _, col := range b.data {
|
||||
for ri := range col {
|
||||
col[ri] = c
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user