Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

canvas

Draw an image.Image to a window. You need to have SDL2 and pkg-config to compile your program.

img := image.NewRGBA(image.Rect(0, 0, 640, 480))

c, err := New(img, 1, "Canvas Title")
if err != nil {
	log.Fatal(err)
}
defer c.Close()

// Update returns true until the window should be closed.
for c.Update() {
	// Modify the image based on its Pix slice or Set.
	c.Draw()
}

Image Sine Wave

About

Draw an image.Image to a window.

Topics

Resources

Releases

No releases published

Packages

No packages published

Languages