From be43f59692e68a414cd7082d89bb3acd61d6fec1 Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Fri, 19 Feb 2016 16:55:58 -0500 Subject: [PATCH] Update README.md --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 601cbe3..de65de3 100644 --- a/README.md +++ b/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 Ever used a graphics library that didn't have functions for drawing rectangles @@ -82,6 +92,17 @@ Push() 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? If you need any of the features below, I recommend using `cairo` instead.