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
21 lines
284 B
12 years ago
|
package main
|
||
|
|
||
|
import (
|
||
12 years ago
|
"code.google.com/p/go-tour/pic"
|
||
12 years ago
|
)
|
||
|
|
||
|
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
|
||
12 years ago
|
}
|
||
|
|
||
|
func main() {
|
||
12 years ago
|
pic.Show(Pic)
|
||
12 years ago
|
}
|