2012-08-26 03:08:27 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2012-11-06 02:00:35 +00:00
|
|
|
"code.google.com/p/go-tour/pic"
|
2012-08-26 03:08:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func Pic(dx, dy int) [][]uint8 {
|
2012-11-06 02:00:35 +00:00
|
|
|
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
|
2012-08-26 03:08:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
2012-11-06 02:00:35 +00:00
|
|
|
pic.Show(Pic)
|
2012-08-26 03:08:27 +00:00
|
|
|
}
|