From 17e9e8cd2b8bc0b083ae914b66bde45b1ce29199 Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Fri, 19 Feb 2016 16:49:48 -0500 Subject: [PATCH] Update README.md --- README.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5f9fcf5..aa0f2ec 100644 --- a/README.md +++ b/README.md @@ -8,25 +8,19 @@ ## Hello, Circle! +Look how easy! + ```go package main import "github.com/fogleman/gg" func main() { - // create a new 1000x1000 pixel image dc := gg.NewContext(1000, 1000) - - // draw a circle at the center with radius 400 - // nothing is drawn yet, we have to call Stroke or Fill dc.DrawCircle(500, 500, 400) - - // use black and 10px stroke width dc.SetRGB(0, 0, 0) dc.SetLineWidth(10) dc.Stroke() - - // write the result to file dc.SavePNG("out.png") } ``` @@ -74,6 +68,8 @@ SetRGB(r, g, b float64) ## Transformation Functions +All the usual matrix transformations are available too. + ```go Identity() Translate(x, y float64)