image.go
func (i *Image) At(x, y int) color.Color {
	if atomic.LoadInt32(&isRunning) == 0 {
		panic("ebiten: (*Image).At is not available outside the main loop so far")
	}

	if i.isDisposed() {
		return color.RGBA{}
	}
	if i.isSubImage() && !image.Pt(x, y).In(i.bounds) {
		return color.RGBA{}
	}
	i.resolvePendingPixels(true)
	r, g, b, a := i.mipmap.original().At(x, y)
	return color.RGBA{r, g, b, a}
}
func (i *Image) At(x, y int) color.Color {
	if atomic.LoadInt32(&isRunning) == 0 {
		panic("ebiten: (*Image).At is not available outside the main loop so far")
	}

	if i.isDisposed() {
		return color.RGBA{}
	}
	if i.isSubImage() && !image.Pt(x, y).In(i.bounds) {
		return color.RGBA{}
	}
	i.resolvePendingPixels(true)
	r, g, b, a := i.mipmap.original().At(x, y)
	return color.RGBA{r, g, b, a}
}
// At returns the color of the image at (x, y).
//
// At loads pixels from GPU to system memory if necessary, which means that At can be slow.
//
// At always returns a transparent color if the image is disposed.
//
// Note that important logic should not rely on values returned by At, since
// the returned values can include very slight differences between some machines.
//
// At can't be called outside the main loop (ebiten.Run's updating function) starts (as of version 1.4.0-alpha).