Skip to content

Instantly share code, notes, and snippets.

@alq666
Created December 26, 2012 00:03
Show Gist options
  • Save alq666/4376579 to your computer and use it in GitHub Desktop.
Save alq666/4376579 to your computer and use it in GitHub Desktop.
package main
import "tour/pic"
func Pic(dx, dy int) [][]uint8 {
m := make([][]uint8, dy, dy)
for i := 0; i < dy; i++ {
m[i] = make([]uint8, dx, dx)
for j := 0; j < dx; j++ {
m[i][j] = uint8((i+j)/2)
}
}
return m
}
func main() {
pic.Show(Pic)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment