func (i *Image) Paint(c gxui.Canvas) { r := i.outer.Size().Rect() i.PaintBackground(c, r) switch { case i.texture != nil: c.DrawTexture(i.texture, i.calculateDrawRect()) case i.canvas != nil: c.DrawCanvas(i.canvas, math.ZeroPoint) } i.PaintBorder(c, r) }