mirror of
https://github.com/golang/go
synced 2024-11-15 05:20:21 -07:00
[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
This commit is contained in:
parent
6b8d891e4e
commit
19b11c49a9
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user