Update README.md

This commit is contained in:
Michael Fogleman 2016-02-19 16:55:58 -05:00
parent 95e441e50e
commit be43f59692

View File

@ -25,6 +25,16 @@ func main() {
} }
``` ```
## Creating Contexts
There are a few ways of creating a context.
```go
NewContext(width, height int) *Context
NewContextForImage(im image.Image) *Context
NewContextForRGBA(im *image.RGBA) *Context
```
## Drawing Functions ## Drawing Functions
Ever used a graphics library that didn't have functions for drawing rectangles Ever used a graphics library that didn't have functions for drawing rectangles
@ -82,6 +92,17 @@ Push()
Pop() Pop()
``` ```
## Helper Functions
Sometimes you just don't want to write these yourself.
```go
Radians(degrees float64) float64
Degrees(radians float64) float64
LoadPNG(path string) (image.Image, error)
SavePNG(path string, im image.Image) error
```
## What's Missing? ## What's Missing?
If you need any of the features below, I recommend using `cairo` instead. If you need any of the features below, I recommend using `cairo` instead.