Update README.md
This commit is contained in:
parent
95e441e50e
commit
be43f59692
21
README.md
21
README.md
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user