Skip to content

Instantly share code, notes, and snippets.

@sorah sorah/62.go
Created May 2, 2014

What would you like to do?
package main
import (
type Image struct{}
func (img Image) ColorModel() color.Model {
return color.RGBAModel
func (img Image) Bounds() image.Rectangle {
return image.Rect(0,0,100,100)
func (img Image) At(x, y int) color.Color {
return &color.RGBA{uint8(x*10),uint8(y*10),100,100}
func main() {
m := Image{}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.