This repository has been archived on 2024-06-02. You can view files and clone it, but cannot push or open issues or pull requests.
x/canvasbox.go

30 lines
500 B
Go
Raw Normal View History

2023-07-02 00:52:14 -06:00
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 {
2023-07-05 01:25:50 -06:00
box := &canvasBox {
2023-07-02 00:52:14 -06:00
box: backend.NewBox().(*box),
}
2023-07-05 01:25:50 -06:00
box.outer = box
return box
2023-07-02 00:52:14 -06:00
}
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()
}