aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gerrand <adg@golang.org>2012-04-26 11:39:33 -0700
committerAndrew Gerrand <adg@golang.org>2012-04-26 11:39:33 -0700
commit19b11c49a977763c9c8636b7200409d980139b54 (patch)
treebb5a88b91046cba7eab6b1c5b853294e034e6ecf
parent6b8d891e4e0d102316d164dbd9b5c376d31649ad (diff)
downloadgo-19b11c49a977763c9c8636b7200409d980139b54.tar.gz
go-19b11c49a977763c9c8636b7200409d980139b54.zip
[release-branch.go1] doc: simplify the image_draw article example for converting an image to
««« CL 6119054 / a7183646b353 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 »»» R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6119056
-rw-r--r--doc/progs/image_draw.go4
1 files changed, 2 insertions, 2 deletions
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}