fogleman / gg

Go Graphics - 2D rendering in Go with a simple API.
https://godoc.org/github.com/fogleman/gg
MIT License
4.37k stars 354 forks source link

Give an example of how to display it on the screen #101

Open Keyn1 opened 4 years ago

Keyn1 commented 4 years ago

Give an example of how to display it on the screen. What is the point of output in png?

naikrovek commented 4 years ago

That's not really an issue with this library. The point of having PNG output is to write PNG images...

In the examples. the gg reference has a Context property/field, and that has a im property/field which is a pointer to a standard Go image.RGBA 32-bit image, and you can access that with Context.Image(). You can display that however you would normally display images on screen.

Does that help?