func (i *Image) SetCanvas(canvas gxui.Canvas) { if !canvas.IsComplete() { panic("SetCanvas() called with an incomplete canvas") } if i.canvas != canvas { i.canvas = canvas i.texture = nil i.outer.Relayout() } }