Example #1
0
func main() {
	m := Image{50, 50, color.RGBA{0, 0, 0, 255}, color.RGBA{255, 255, 255, 255}, func(x, y int) bool {
		if x == y {
			return true
		}
		return false
	}}
	pic.ShowImage(m)
}
Example #2
0
func main() {
	m := NewImage(255, 255, func(a, b int) uint8 { return uint8(a * b) })
	pic.ShowImage(m)
}
Example #3
0
func main() {
	m := Image{}
	pic.ShowImage(m)
}
Example #4
0
func main() {
	m := Image{500, 500}
	pic.ShowImage(&m)
}
Example #5
0
func main() {
	m := Image{256, 256}
	pic.ShowImage(m)
}
Example #6
0
func main() {
	m := makePic(200, 100, valueOfPointer)
	// 调用pic类的ShowImage来显示生成的图片
	pic.ShowImage(m)
}