Skip to content

bake/canvas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages