28 lines
471 B
Go
28 lines
471 B
Go
package x
|
|
|
|
import "git.tebibyte.media/tomo/tomo"
|
|
import "git.tebibyte.media/tomo/tomo/canvas"
|
|
|
|
type canvasBox struct {
|
|
*box
|
|
}
|
|
|
|
func (backend *Backend) NewCanvasBox () tomo.CanvasBox {
|
|
return &canvasBox {
|
|
box: backend.NewBox().(*box),
|
|
}
|
|
}
|
|
|
|
func (this *canvasBox) Box () tomo.Box {
|
|
return this
|
|
}
|
|
|
|
func (this *canvasBox) SetDrawer (drawer canvas.Drawer) {
|
|
this.drawer = drawer
|
|
this.invalidateDraw()
|
|
}
|
|
|
|
func (this *canvasBox) Invalidate () {
|
|
this.invalidateDraw()
|
|
}
|