From: Nigel Tao Date: Thu, 26 Apr 2012 07:39:04 +0000 (+1000) Subject: doc: simplify the image_draw article example for converting an image to X-Git-Tag: go1.1rc2~3305 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b28431ec8e73d5d5fc3fd6b2c7f33ecc206124b3;p=gostls13.git doc: simplify the image_draw article example for converting an image to RGBA. R=adg, r, bsiegert CC=golang-dev https://golang.org/cl/6119054 --- diff --git a/doc/progs/image_draw.go b/doc/progs/image_draw.go index 2cc5c632f3..bb73c8a714 100644 --- a/doc/progs/image_draw.go +++ b/doc/progs/image_draw.go @@ -84,8 +84,8 @@ func ConvAndCircle() { // CONV OMIT b := src.Bounds() - m := image.NewRGBA(image.Rect(0, 0, b.Dx(), b.Dy())) - draw.Draw(m, m.Bounds(), src, b.Min, draw.Src) + m := image.NewRGBA(b) + draw.Draw(m, b, src, b.Min, draw.Src) // STOP OMIT p := image.Point{100, 100}