You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
284 B

package main
import (
12 years ago
"code.google.com/p/go-tour/pic"
)
func Pic(dx, dy int) [][]uint8 {
12 years ago
cols := make([][]uint8, dy)
for i := range cols {
cols[i] = make([]uint8, dx)
for j := range cols[i] {
cols[i][j] = uint8(j ^ i)
}
}
return cols
}
func main() {
12 years ago
pic.Show(Pic)
}