25 lines
470 B
Go
25 lines
470 B
Go
package style
|
|
|
|
import "image"
|
|
import "image/color"
|
|
|
|
type missingTexture int
|
|
|
|
func (texture missingTexture) ColorModel () color.Model {
|
|
return color.RGBAModel
|
|
}
|
|
|
|
func (texture missingTexture) Bounds () image.Rectangle {
|
|
return image.Rect(0, 0, int(texture), int(texture))
|
|
}
|
|
|
|
func (texture missingTexture) At (x, y int) color.Color {
|
|
x /= 8
|
|
y /= 8
|
|
if (x + y) % 2 == 0 {
|
|
return color.RGBA { R: 0xFF, B: 0xFF, A: 0xFF }
|
|
} else {
|
|
return color.RGBA { A: 0xFF }
|
|
}
|
|
}
|