本文整理匯總了Golang中code/google/com/p/go-tour/pic.ShowImage函數的典型用法代碼示例。如果您正苦於以下問題:Golang ShowImage函數的具體用法?Golang ShowImage怎麽用?Golang ShowImage使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了ShowImage函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: main
func main() {
m := Image{}
m.h = 50
m.w = 100
m.rgba = color.RGBA{1, 155, 255, 55}
pic.ShowImage(m)
}
示例2: main
func main() {
m := Image{
128,
128,
func(x, y int) (val uint8) { return uint8(4 * (x + y)) },
func(x, y int) (val uint8) { return uint8(x) },
func(x, y int) (val uint8) { return uint8(y) },
}
pic.ShowImage(m)
}
示例3: main
func main() {
m := Image{w: 1024, h: 1024, model: color.RGBAModel}
m.px = make([][]uint8, m.w)
for y := 0; y < m.w; y++ {
m.px[y] = make([]uint8, m.h)
for x := 0; x < m.h; x++ {
m.px[y][x] = uint8(x + y)
}
}
pic.ShowImage(&m)
}
示例4: main
func main() {
rand.Seed(time.Now().Unix())
x, y := 100, 100
img := make([][]Pixel, x)
for i := 0; i < x; i++ {
img[i] = make([]Pixel, y)
for j := 0; j < y; j++ {
img[i][j] = Pixel{uint8(rand.Intn(255)),
uint8(rand.Intn(255)),
uint8(rand.Intn(255)),
255}
}
}
m := Image{x, y, img}
pic.ShowImage(m)
}
示例5: main
func main() {
_, trace := getHeader("/home/taysom/tau/tau.pj/go.t/tour.d/a-meta")
dy := divup(maxblock(trace), dx)
m := Image{image.Rect(0, 0, dx, dy), make([][dx]bool, dy)}
for _, t := range trace {
for j := 0; j < int(t.Count); j++ {
block := int(t.Block) + j
y := block / dx
x := block % dx
m.Used[y][x] = true
}
}
if false {
pic.ShowImage(m)
} else {
fmt.Println(dx, dy)
}
}
示例6: main
func main() {
m := Image{width: 500, height: 500}
pic.ShowImage(m)
}
示例7: main
func main() {
m := &Image{100, 100}
pic.ShowImage(m)
}
示例8: main
func main() {
m := Image{200, 200}
pic.ShowImage(m)
}
示例9: main
func main() {
m := Image{w: 100, h: 100}
pic.ShowImage(m)
}
示例10: main
func main() {
m := &Image{50, 50, 200, 200, 100}
pic.ShowImage(m)
}
示例11: main
func main() {
m := Image{10, 10}
pic.ShowImage(&m)
}
示例12: main
func main() {
m := Image{255, 255, power}
pic.ShowImage(m)
}
示例13: main
func main() {
m := Image{10, 10}
// it passes 'm' directly so we need to use (i Image) in above interface declaration.
pic.ShowImage(m)
}
示例14: main
func main() {
m := Image{image.Rect(0, 0, 255, 255)}
pic.ShowImage(m)
}
示例15: main
func main() {
m := Image{100, 80}
pic.ShowImage(m)
}