Buffer, DamageBuffer, and Application are io.Writers
This commit is contained in:
parent
18ea5681de
commit
4b129a8391
@ -19,6 +19,7 @@ type Backend struct {
|
|||||||
backgroundStamper *imdraw.IMDraw
|
backgroundStamper *imdraw.IMDraw
|
||||||
fontAtlas *text.Atlas
|
fontAtlas *text.Atlas
|
||||||
textDrawer *text.Text
|
textDrawer *text.Text
|
||||||
|
showBounds bool
|
||||||
|
|
||||||
metrics struct {
|
metrics struct {
|
||||||
cellWidth int
|
cellWidth int
|
||||||
@ -177,6 +178,8 @@ func (backend *Backend) draw () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// draw a rectangle around the buffer if we are showing bounds
|
||||||
|
if backend.showBounds {
|
||||||
backend.backgroundStamper.Clear()
|
backend.backgroundStamper.Clear()
|
||||||
backend.backgroundStamper.Color =
|
backend.backgroundStamper.Color =
|
||||||
backend.config.Color(stone.ColorBackground)
|
backend.config.Color(stone.ColorBackground)
|
||||||