blob: c2eeb66ea01c46ca9554cdfde5b638c88e54c2e0 [file] [log] [blame]
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
package main
import "code.google.com/p/go-tour/pic"
func Pic(dx, dy int) [][]uint8 {
p := make([][]uint8, dy)
for i := range p {
p[i] = make([]uint8, dx)
}
for y, row := range p {
for x := range row {
row[x] = uint8(x * y)
}
}
return p
}
func main() {
pic.Show(Pic)
}