direct-draw #6

Merged
sashakoshka merged 10 commits from direct-draw into main 2023-01-31 21:05:26 -07:00
Showing only changes of commit 6d6a0c59a1 - Show all commits

View File

@ -13,6 +13,7 @@ type Window struct {
backend *Backend backend *Backend
xWindow *xwindow.Window xWindow *xwindow.Window
xCanvas *xgraphics.Image xCanvas *xgraphics.Image
canvas tomo.BasicCanvas
child tomo.Element child tomo.Element
onClose func () onClose func ()
skipChildDrawCallback bool skipChildDrawCallback bool
@ -194,6 +195,9 @@ func (window *Window) OnClose (callback func ()) {
} }
func (window *Window) reallocateCanvas () { func (window *Window) reallocateCanvas () {
window.canvas = tomo.NewBasicCanvas (
window.metrics.width,
window.metrics.height)
if window.xCanvas != nil { if window.xCanvas != nil {
window.xCanvas.Destroy() window.xCanvas.Destroy()
} }