Skip to content

Instantly share code, notes, and snippets.

@tarsisazevedo
Created December 25, 2013 23:01
Show Gist options
  • Save tarsisazevedo/8127760 to your computer and use it in GitHub Desktop.
Save tarsisazevedo/8127760 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 {
points_y := make([][]uint8, dy)
for i := range(points_y) {
points_x := make([]uint8, dx)
for j := range(points_x) {
points_x[j] = uint8(i*j)
}
points_y[i] = points_x
}
return points_y
}
func main() {
pic.Show(Pic)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment