diff options
author | kortschak <dan.kortschak@adelaide.edu.au> | 2016-04-14 08:48:41 +0930 |
---|---|---|
committer | Nigel Tao <nigeltao@golang.org> | 2016-04-15 06:55:23 +0000 |
commit | 831cc3b33e6c93f9b6c70df079fb2d85c8f8f5cf (patch) | |
tree | 1b60fa181b6b80b0d29a90fff67b9c1d994069b1 | |
parent | 2a90f9eea00684794d8948aafcf44dd3dbe9b9d5 (diff) |
content: fix spelling
Change-Id: Ia93eb978c76fbbe082b46d07b5cb954e8d3c57a8
Reviewed-on: https://go-review.googlesource.com/22009
Reviewed-by: Nigel Tao <nigeltao@golang.org>
-rw-r--r-- | content/go-image-package.article | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/content/go-image-package.article b/content/go-image-package.article index 2f51dd4..6734e8b 100644 --- a/content/go-image-package.article +++ b/content/go-image-package.article @@ -68,7 +68,7 @@ A [[http://golang.org/pkg/image/#Rectangle][`Rectangle`]] is an axis-aligned rec For convenience, `image.Rect(x0,`y0,`x1,`y1)` is equivalent to `image.Rectangle{image.Point{x0,`y0},`image.Point{x1,`y1}}`, but is much easier to type. -A `Rectangle` is inclusive at the top-left and exclusive at the bottom-right. For a `Point`p` and a `Rectangle`r`, `p.In(r)` if and only if `r.Min.X`<=`p.X`&&`p.X`<`r.Max.X`, and similarly for `Y`. This is analagous to how a slice `s[i0:i1]` is inclusive at the low end and exclusive at the high end. (Unlike arrays and slices, a `Rectangle` often has a non-zero origin.) +A `Rectangle` is inclusive at the top-left and exclusive at the bottom-right. For a `Point`p` and a `Rectangle`r`, `p.In(r)` if and only if `r.Min.X`<=`p.X`&&`p.X`<`r.Max.X`, and similarly for `Y`. This is analogous to how a slice `s[i0:i1]` is inclusive at the low end and exclusive at the high end. (Unlike arrays and slices, a `Rectangle` often has a non-zero origin.) .image go-image-package_image-package-02.png @@ -143,7 +143,7 @@ These types also provide a `Set(x,`y`int,`c`color.Color)` method that allows mod If you're reading or writing a lot of pixel data, it can be more efficient, but more complicated, to access these struct type's `Pix` field directly. -The slice-based `Image` implementations also provide a `SubImage` method, which returns an `Image` backed by the same array. Modifying the pixels of a sub-image will affect the pixels of the original image, analagous to how modifying the contents of a sub-slice `s[i0:i1]` will affect the contents of the original slice `s`. +The slice-based `Image` implementations also provide a `SubImage` method, which returns an `Image` backed by the same array. Modifying the pixels of a sub-image will affect the pixels of the original image, analogous to how modifying the contents of a sub-slice `s[i0:i1]` will affect the contents of the original slice `s`. .image go-image-package_image-package-05.png |