Skip to content

Instantly share code, notes, and snippets.

@kei-s
Created July 14, 2014 11:21
Show Gist options
  • Save kei-s/611ce55123dc8e715539 to your computer and use it in GitHub Desktop.
Save kei-s/611ce55123dc8e715539 to your computer and use it in GitHub Desktop.
package main
import "code.google.com/p/go-tour/pic"
func Pic(dx, dy int) [][]uint8 {
pic := make([][]uint8, dy)
for y := range pic {
pic[y] = make([]uint8, dx)
for x := range pic[y] {
pic[y][x] = uint8(x^y)
}
}
return pic
}
func main() {
pic.Show(Pic)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment