image_package5.go 347 B

1234567891011121314151617
  1. // Copyright 2012 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package main
  5. import (
  6. "fmt"
  7. "image"
  8. "image/color"
  9. )
  10. func main() {
  11. m := image.NewRGBA(image.Rect(0, 0, 640, 480))
  12. m.Set(5, 5, color.RGBA{255, 0, 0, 255})
  13. fmt.Println(m.At(5, 5))
  14. }