From f923250a65115993ea771b77abc63407b5751847 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 21 Aug 2022 20:02:09 +0900 Subject: [PATCH] ebiten: typo --- image.go | 16 ++++++++-------- text/text.go | 4 ++-- window.go | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/image.go b/image.go index 22e19f0f7..a825c07b6 100644 --- a/image.go +++ b/image.go @@ -323,7 +323,7 @@ type Vertex struct { // SrcX and SrcY represents a point on a source image. // Be careful that SrcX/SrcY coordinates are on the image's bounds. - // This means that a left-upper point of a sub-image might not be (0, 0). + // This means that a upper-left point of a sub-image might not be (0, 0). SrcX float32 SrcY float32 @@ -615,8 +615,8 @@ func (i *Image) DrawTrianglesShader(vertices []Vertex, indices []uint16, shader } b := img.Bounds() x, y := img.adjustPosition(b.Min.X, b.Min.Y) - // (sx, sy) is the left-upper position of the first image. - // Calculate the distance between the current image's left-upper position and the first one's. + // (sx, sy) is the upper-left position of the first image. + // Calculate the distance between the current image's upper-left position and the first one's. offsets[i][0] = float32(x - sx) offsets[i][1] = float32(y - sy) } @@ -717,8 +717,8 @@ func (i *Image) DrawRectShader(width, height int, shader *Shader, options *DrawR } b := img.Bounds() x, y := img.adjustPosition(b.Min.X, b.Min.Y) - // (sx, sy) is the left-upper position of the first image. - // Calculate the distance between the current image's left-upper position and the first one's. + // (sx, sy) is the upper-left position of the first image. + // Calculate the distance between the current image's upper-left position and the first one's. offsets[i][0] = float32(x - sx) offsets[i][1] = float32(y - sy) } @@ -986,7 +986,7 @@ type NewImageOptions struct { // // The rendering origin position is (0, 0) of the given bounds. // If DrawImage is called on a new image created by NewImageOptions, -// for example, the center of scaling and rotating is (0, 0), that might not be a left-upper position. +// for example, the center of scaling and rotating is (0, 0), that might not be a upper-left position. // // If options is nil, the default setting is used. // @@ -1034,7 +1034,7 @@ func newImage(bounds image.Rectangle, imageType atlas.ImageType) *Image { // // NewImageFromImage panics if RunGame already finishes. // -// The returned image's left-upper position is always (0, 0). The source's bounds are not respected. +// The returned image's upper-left position is always (0, 0). The source's bounds are not respected. func NewImageFromImage(source image.Image) *Image { return NewImageFromImageWithOptions(source, nil) } @@ -1050,7 +1050,7 @@ type NewImageFromImageOptions struct { Unmanaged bool // PreserveBounds represents whether the new image's bounds are the same as the given image. - // The default (zero) value is false, that means the new image's left-upper position is adjusted to (0, 0). + // The default (zero) value is false, that means the new image's upper-left position is adjusted to (0, 0). PreserveBounds bool } diff --git a/text/text.go b/text/text.go index b85da38c1..0a3cbab54 100644 --- a/text/text.go +++ b/text/text.go @@ -149,7 +149,7 @@ var textM sync.Mutex // (x, y) represents a 'dot' (period) position. // This means that if the given text consisted of a single character ".", // it would be positioned at the given position (x, y). -// Be careful that this doesn't represent left-upper corner position. +// Be careful that this doesn't represent upper-left corner position. // // clr is the color for text rendering. // @@ -190,7 +190,7 @@ func Draw(dst *ebiten.Image, text string, face font.Face, x, y int, clr color.Co // face is the font for text rendering. // op is the options to draw glyph images. // The origin point is a 'dot' (period) position. -// Be careful that the origin point is not left-upper corner position of dst. +// Be careful that the origin point is not upper-left corner position of dst. // The default glyph color is while. op's ColorM adjusts the color. // // If you want to adjust the position of the text, these functions are useful: diff --git a/window.go b/window.go index a768de982..364d2a03a 100644 --- a/window.go +++ b/window.go @@ -131,7 +131,7 @@ func SetWindowIcon(iconImages []image.Image) { } // WindowPosition returns the window position. -// The origin position is the left-upper corner of the current monitor. +// The origin position is the upper-left corner of the current monitor. // The unit is device-independent pixels. // // WindowPosition panics if the main loop does not start yet. @@ -146,7 +146,7 @@ func WindowPosition() (x, y int) { } // SetWindowPosition sets the window position. -// The origin position is the left-upper corner of the current monitor. +// The origin position is the upper-left corner of the current monitor. // The unit is device-independent pixels. // // SetWindowPosition sets the original window position in fullscreen mode.