示例#1
0
文件: image.go 项目: langxj/gxui
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)
}